14
14
[ ![ GitHub contributors] ( https://img.shields.io/github/contributors/adamspd/django-appointment )] ( https://github.com/adamspd/django-appointment/graphs/contributors )
15
15
16
16
⚠️ ** IMPORTANT** : If upgrading from a version before 2.x.x, please note significant database changes were introduced in
17
- Version 2.0.0 introduces significant database changes . Please read
17
+ version 2.0.0. Please read
18
18
the [ migration guide] ( https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_0.md ) before
19
19
updating. Version 3.x.x introduces the ability to send email reminders for appointments using Django Q for efficient
20
20
task scheduling. It also allows clients to reschedule appointments if it is allowed by admins.
21
21
22
22
Django-Appointment is a Django app engineered for managing appointment scheduling with ease and flexibility. It enables
23
- users to define custom configurations for time slots, lead time, and finish time, or utilize the default values
23
+ users to define custom configurations for time slots, lead time, and finish time, or use the default values
24
24
provided. This app proficiently manages conflicts and availability for appointments, ensuring a seamless user
25
25
experience.
26
26
@@ -40,7 +40,7 @@ and [here](https://github.com/adamspd/django-appointment/tree/main/docs/release_
40
40
3 . Seamless integration with the Django admin interface for appointment management.
41
41
4 . Custom admin interface for managing appointment/staff member editing, creation, availability, and conflicts.
42
42
5 . User-friendly interface for viewing available time slots and scheduling appointments.
43
- 6 . Capability to send email notifications to clients upon scheduling an appointment and email reminders for
43
+ 6 . Ability to send email notifications to clients upon scheduling an appointment and email reminders for
44
44
appointments, leveraging Django Q for task scheduling and efficiency.
45
45
46
46
## Key features introduced in previous versions.
@@ -50,13 +50,13 @@ and [here](https://github.com/adamspd/django-appointment/tree/main/docs/release_
50
50
51
51
## Added Features and Bug Fixes in version 3.x.x
52
52
53
- See the [ release notes] ( https://github.com/adamspd/django-appointment/releases/tag/v3.2.0 ) .
53
+ See the [ release notes] ( https://github.com/adamspd/django-appointment/releases/tag/v3.3.1 ) .
54
54
For older version,
55
55
see their [ release notes] ( https://github.com/adamspd/django-appointment/tree/main/docs/release_notes ) .
56
56
57
57
## Quick Start 🚀
58
58
59
- 1 . Add "appointment" to your ` INSTALLED_APPS ` setting like so:
59
+ 1 . Add "appointment" (& "django_q" if you want to enable email reminders) to your ` INSTALLED_APPS ` setting like so:
60
60
61
61
``` python
62
62
INSTALLED_APPS = [
@@ -66,7 +66,7 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
66
66
]
67
67
```
68
68
69
- 2 . Incorporate the appointment URLconf in your project's ` urls.py ` like so :
69
+ 2 . Then, incorporate the appointment URLconf in your project's ` urls.py ` :
70
70
71
71
``` python
72
72
from django.urls import path, include
@@ -82,54 +82,61 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
82
82
AUTH_USER_MODEL = ' models.UserModel' # Optional if you use Django's user model
83
83
```
84
84
85
- For instance, if you employ a custom user model:
85
+ For instance, if you employ a custom user model called ` UserClient ` in an app named ` client ` , you would add it like :
86
86
87
87
``` python
88
88
AUTH_USER_MODEL = ' client.UserClient'
89
89
```
90
90
91
- If you're utilizing the default Django user model, there's no need to add this line since Django automatically sets
92
- it to:
91
+ But if you're using the default Django user model (like most of us) , there's no need to add this line since Django
92
+ automatically sets it to:
93
93
94
94
``` python
95
95
AUTH_USER_MODEL = ' auth.User'
96
96
```
97
97
98
- Ensure your ` create_user ` function includes the following arguments, even if they are not all utilized:
98
+ Ensure your ` create_user ` function includes the following arguments, even if they are not all used (in case you're
99
+ using a custom user model with your own logic for creating users):
99
100
100
101
``` python
101
102
def create_user (first_name , email , username , last_name = None , ** extra_fields ):
102
103
pass
103
104
```
104
105
105
- This function will create a passwordless user. A link to set the password will be sent to the user's email.
106
+ This function will create a passwordless user.
107
+ After doing so, a link to set the password will be sent to the user's email upon completing the appointment request.
106
108
107
- Configure the website's name in your ` settings.py ` like this :
109
+ Another variable that is worth configuring is the website's name in your ` settings.py ` :
108
110
109
111
``` python
110
112
APPOINTMENT_WEBSITE_NAME = ' Chocolates'
111
113
```
112
114
113
- It will be utilized in the footer of the emails sent to clients upon scheduling an appointment:
115
+ It will be used in the footer of the emails sent to clients upon scheduling an appointment:
114
116
115
117
``` html
116
118
<p >® 2023 {{ APPOINTMENT_WEBSITE_NAME }}. All Rights Reserved.</p >
117
119
```
118
120
119
- Configure ` Q_CLUSTER ` in your Django's ` settings.py ` to enable Django Q task scheduling:
121
+ To be able to send email reminders after adding ` django_q ` to your ` INSTALLED_APPS ` , you must add this variable
122
+ ` Q_CLUSTER ` in your Django's ` settings.py ` . If done, and users check the box to receive reminders, you and them
123
+ will receive an email reminder 24 hours before the appointment.
124
+
125
+ Here's a configuration example, that you can use without modification (if you don't want to do much research):
126
+
120
127
``` python
121
- Q_CLUSTER = {
122
- ' name' : ' DjangORM' ,
123
- ' workers' : 4 ,
124
- ' timeout' : 90 ,
125
- ' retry' : 120 ,
126
- ' queue_limit' : 50 ,
127
- ' bulk' : 10 ,
128
- ' orm' : ' default' ,
129
- }
130
- ```
128
+ Q_CLUSTER = {
129
+ ' name' : ' DjangORM' ,
130
+ ' workers' : 4 ,
131
+ ' timeout' : 90 ,
132
+ ' retry' : 120 ,
133
+ ' queue_limit' : 50 ,
134
+ ' bulk' : 10 ,
135
+ ' orm' : ' default' ,
136
+ }
137
+ ```
131
138
132
- 4 . Run `python manage.py migrate` to create the appointment models.
139
+ 4 . Next would be to run ` python manage.py migrate ` to create the appointment models.
133
140
134
141
5 . Start the Django Q cluster with ` python manage.py qcluster ` .
135
142
@@ -143,35 +150,37 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
143
150
144
151
## Docker Support 🐳
145
152
146
- Django- Appointment now supports Docker, making it easier to set up, develop, and deploy. With Docker and Docker Compose,
147
- you can quickly get the project running in a consistent environment, streamline the development process, and simplify
148
- deployment across different platforms.
153
+ Django-Appointment now supports Docker, making it easier to set up, develop, and test.
149
154
150
155
### Getting Started with Docker for Development or Local Testing
151
156
152
- Using Django- Appointment with Docker is primarily intended for development purposes or local testing. This means you ' ll
153
- need to clone the project from the GitHub repository to get started.
157
+ Using Django-Appointment with Docker is primarily intended for ** development purposes** or ** local testing** .
158
+ This means you'll need to ___ clone the project from the GitHub repository ___ to get started.
154
159
155
- Here' s how you can set up Django-Appointment for local development or testing with Docker :
160
+ Here's how you can set it up :
156
161
157
162
1 . ** Clone the Repository** : Clone the Django-Appointment repository to your local machine:
158
163
159
164
``` bash
160
165
git clone https://github.com/adamspd/django-appointment.git
161
166
```
162
-
167
+
163
168
or using SSH:
164
169
``` bash
165
170
git clone
[email protected] :adamspd/django-appointment.git
166
171
```
167
172
168
- 2 . ** Prepare .env File** : Create an `.env` file in the root directory of your project with your configuration settings.
169
- You should include your email host user and password for Django' s email functionality:
173
+ 2 . ** Prepare an .env File** : Create an ` .env ` file in the root directory of your project with your configuration
174
+ settings.
175
+ You should include your email host user and password for Django's email functionality (if you want it to work):
170
176
171
177
``` plaintext
172
178
173
179
EMAIL_HOST_PASSWORD=your_password
174
180
```
181
+
182
+ > ** Note:** The ` .env ` file is used to store sensitive information and should not be committed to version control.
183
+
175
184
3 . ** Build and Run the Docker Containers** : Run the following command to build and run the Docker containers:
176
185
177
186
``` bash
@@ -198,9 +207,9 @@ Here's how you can set up Django-Appointment for local development or testing wi
198
207
docker-compose exec web python manage.py migrate
199
208
```
200
209
201
- > ** Note:** I use the default database settings for the Docker container. If you want to use a different database, you
202
- > can
203
- > modify the Dockerfile and docker - compose.yml files to use your preferred database.
210
+ > **Note:** I used the default database settings for the Docker container.
211
+ > If you want to use a different database, you can modify the Dockerfile and docker-compose.yml files to use your
212
+ > preferred database.
204
213
205
214
## Customization 🔧
206
215
0 commit comments