@@ -4,7 +4,7 @@ Appointment Scheduler is a Django app designed for managing appointment scheduli
4
4
users to define custom configurations for time slots, lead time, and finish time, or use the default values provided.
5
5
The app also handles conflicts and availability for appointments, ensuring a smooth user experience.
6
6
7
- Detailed documentation is in the "docs" directory.
7
+ Detailed documentation is in the [ "docs"] ( docs/README.md ) directory.
8
8
9
9
## Features
10
10
@@ -19,7 +19,7 @@ Detailed documentation is in the "docs" directory.
19
19
20
20
``` python
21
21
INSTALLED_APPS = [
22
- ' ...' ,
22
+ ...
23
23
' appointment' ,
24
24
]
25
25
```
@@ -30,36 +30,74 @@ INSTALLED_APPS = [
30
30
from django.urls import path, include
31
31
32
32
urlpatterns = [
33
- ' ...' ,
33
+ ...
34
34
path(' appointment/' , include(' appointment.urls' )),
35
35
]
36
36
```
37
37
38
- 3 . Run ` python manage .py migrate ` to create the appointment models.
38
+ 3 . In your Django's settings .py, add the following:
39
39
40
- 4 . Start the development server and visit http://127.0.0.1:8000/admin/
40
+ ``` python
41
+ APPOINTMENT_CLIENT_MODEL = file .UserModel # Not optional (e.g. auth.User, or client.UserClient)
42
+ ```
43
+
44
+ for example if you use the default Django user model:
45
+
46
+ ``` python
47
+ APPOINTMENT_CLIENT_MODEL = auth.User
48
+ ```
49
+
50
+ or if you use a custom user model:
51
+
52
+ ``` python
53
+ APPOINTMENT_CLIENT_MODEL = client.UserClient
54
+ ```
55
+
56
+ Now if you have a custom user model, in your function create_user, you have to have the following arguments even if you
57
+ don't use all of them:
58
+
59
+ ``` python
60
+ def create_user (first_name , email , username , ** extra_fields ):
61
+ pass
62
+ ```
63
+
64
+ This will create a user with the password = f"{APPOINTMENT_WEBSITE_NAME}{current_year}"
65
+
66
+ For example if you put in your settings.py:
67
+
68
+ ``` python
69
+ APPOINTMENT_WEBSITE_NAME = ' Chocolates'
70
+ ```
71
+
72
+ and the current year is 2023, the password will be "Chocolates2023" if you don't provide an APPOINTMENT_WEBSITE_NAME,
73
+ the default value is "Website", so the password will be "Website2023".
74
+
75
+ 4 . Run ` python manage.py migrate ` to create the appointment models.
76
+
77
+
78
+ 5 . Start the development server and visit http://127.0.0.1:8000/admin/
41
79
to create appointments, manage configurations, and handle appointment conflicts (you'll need the Admin app enabled).
42
80
43
- 5 . You have to create at least a service before using the application in the admin page. If your service is free, add 0
81
+
82
+ 6 . You have to create at least a service before using the application in the admin page. If your service is free, add 0
44
83
as the price. If you want to charge for your service, add the price in the price field. You can also add a
45
- description
46
- for your service.
84
+ description for your service.
47
85
48
- 6 . Visit http://127.0.0.1:8000/appointment/request/ <service_id>/ to view the available time slots and schedule an
86
+ 7 . Visit http://127.0.0.1:8000/appointment/request/ <service_id>/ to view the available time slots and schedule an
49
87
appointment.
50
88
51
89
## Customization
52
90
53
91
1 . In your Django project's settings.py, you can override the default values for the appointment scheduler:
54
92
55
93
``` python
94
+ # Default values
56
95
APPOINTMENT_SLOT_DURATION = 30 # minutes
57
96
APPOINTMENT_LEAD_TIME = (9 , 0 ) # (hour, minute) 24-hour format
58
97
APPOINTMENT_FINISH_TIME = (16 , 30 ) # (hour, minute) 24-hour format
59
98
60
99
# Additional configuration options
61
- APPOINTMENT_CLIENT_MODEL = ' auth.User'
62
- APPOINTMENT_BASE_TEMPLATE = ' base_templates/base.html'
100
+ APPOINTMENT_BASE_TEMPLATE = ' base_templates/base.html' # your base template
63
101
APPOINTMENT_WEBSITE_NAME = ' Website'
64
102
APPOINTMENT_PAYMENT_URL = None
65
103
APPOINTMENT_THANK_YOU_URL = None
@@ -73,3 +111,8 @@ APPOINTMENT_THANK_YOU_URL = None
73
111
74
112
For support or questions regarding the Appointment Scheduler app, please refer to the documentation in the "docs"
75
113
directory or visit the GitHub repository for more information.
114
+
115
+ ## Notes
116
+
117
+ The application doesn't send confirmation emails on appointment creation yet, but it will be implemented soon.
118
+ Also the application doesn't send email reminders yet.
0 commit comments