Skip to content

Commit 32c1cb4

Browse files
committed
Updated documentation to be more understandable
1 parent 6204fc1 commit 32c1cb4

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

README.md

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
[![GitHub contributors](https://img.shields.io/github/contributors/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/graphs/contributors)
1515

1616
⚠️ **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
1818
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_0.md) before
1919
updating. Version 3.x.x introduces the ability to send email reminders for appointments using Django Q for efficient
2020
task scheduling. It also allows clients to reschedule appointments if it is allowed by admins.
2121

2222
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
2424
provided. This app proficiently manages conflicts and availability for appointments, ensuring a seamless user
2525
experience.
2626

@@ -40,7 +40,7 @@ and [here](https://github.com/adamspd/django-appointment/tree/main/docs/release_
4040
3. Seamless integration with the Django admin interface for appointment management.
4141
4. Custom admin interface for managing appointment/staff member editing, creation, availability, and conflicts.
4242
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
4444
appointments, leveraging Django Q for task scheduling and efficiency.
4545

4646
## Key features introduced in previous versions.
@@ -50,13 +50,13 @@ and [here](https://github.com/adamspd/django-appointment/tree/main/docs/release_
5050

5151
## Added Features and Bug Fixes in version 3.x.x
5252

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).
5454
For older version,
5555
see their [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes).
5656

5757
## Quick Start 🚀
5858

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:
6060

6161
```python
6262
INSTALLED_APPS = [
@@ -66,7 +66,7 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
6666
]
6767
```
6868

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`:
7070

7171
```python
7272
from django.urls import path, include
@@ -82,54 +82,61 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
8282
AUTH_USER_MODEL = 'models.UserModel' # Optional if you use Django's user model
8383
```
8484

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:
8686

8787
```python
8888
AUTH_USER_MODEL = 'client.UserClient'
8989
```
9090

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:
9393

9494
```python
9595
AUTH_USER_MODEL = 'auth.User'
9696
```
9797

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):
99100

100101
```python
101102
def create_user(first_name, email, username, last_name=None, **extra_fields):
102103
pass
103104
```
104105

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.
106108

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`:
108110

109111
```python
110112
APPOINTMENT_WEBSITE_NAME = 'Chocolates'
111113
```
112114

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:
114116

115117
```html
116118
<p>® 2023 {{ APPOINTMENT_WEBSITE_NAME }}. All Rights Reserved.</p>
117119
```
118120

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+
120127
```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+
```
131138

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.
133140

134141
5. Start the Django Q cluster with `python manage.py qcluster`.
135142

@@ -143,35 +150,37 @@ see their [release notes](https://github.com/adamspd/django-appointment/tree/mai
143150

144151
## Docker Support 🐳
145152

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.
149154

150155
### Getting Started with Docker for Development or Local Testing
151156

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.
154159

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:
156161

157162
1. **Clone the Repository**: Clone the Django-Appointment repository to your local machine:
158163

159164
```bash
160165
git clone https://github.com/adamspd/django-appointment.git
161166
```
162-
167+
163168
or using SSH:
164169
```bash
165170
git clone [email protected]:adamspd/django-appointment.git
166171
```
167172

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):
170176

171177
```plaintext
172178
173179
EMAIL_HOST_PASSWORD=your_password
174180
```
181+
182+
> **Note:** The `.env` file is used to store sensitive information and should not be committed to version control.
183+
175184
3. **Build and Run the Docker Containers**: Run the following command to build and run the Docker containers:
176185

177186
```bash
@@ -198,9 +207,9 @@ Here's how you can set up Django-Appointment for local development or testing wi
198207
docker-compose exec web python manage.py migrate
199208
```
200209
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.
204213
205214
## Customization 🔧
206215

0 commit comments

Comments
 (0)