Skip to content

Commit dfe2441

Browse files
authored
Merge pull request #120 from adamspd/update-main-readme
Updated documentation
2 parents f01346b + 32c1cb4 commit dfe2441

File tree

2 files changed

+47
-41
lines changed

2 files changed

+47
-41
lines changed

README.md

Lines changed: 46 additions & 40 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,57 +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 user with a password formatted as: f"{APPOINTMENT_WEBSITE_NAME}{current_year}"
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-
For instance, if you append this to your `settings.py`:
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-
And the current year is 2023, the password will be "Chocolates2023". If `APPOINTMENT_WEBSITE_NAME` is not provided,
114-
the default value is "Website", rendering the password as "Website2023".
115-
116-
This name is also 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:
117116

118117
```html
119118
<p>® 2023 {{ APPOINTMENT_WEBSITE_NAME }}. All Rights Reserved.</p>
120119
```
121120

122-
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+
123127
```python
124-
Q_CLUSTER = {
125-
'name': 'DjangORM',
126-
'workers': 4,
127-
'timeout': 90,
128-
'retry': 120,
129-
'queue_limit': 50,
130-
'bulk': 10,
131-
'orm': 'default',
132-
}
133-
```
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+
```
134138

135-
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.
136140

137141
5. Start the Django Q cluster with `python manage.py qcluster`.
138142

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

147151
## Docker Support 🐳
148152

149-
Django-Appointment now supports Docker, making it easier to set up, develop, and deploy. With Docker and Docker Compose,
150-
you can quickly get the project running in a consistent environment, streamline the development process, and simplify
151-
deployment across different platforms.
153+
Django-Appointment now supports Docker, making it easier to set up, develop, and test.
152154

153155
### Getting Started with Docker for Development or Local Testing
154156

155-
Using Django-Appointment with Docker is primarily intended for development purposes or local testing. This means you'll
156-
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.
157159

158-
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:
159161

160162
1. **Clone the Repository**: Clone the Django-Appointment repository to your local machine:
161163

162164
```bash
163165
git clone https://github.com/adamspd/django-appointment.git
164166
```
165-
167+
166168
or using SSH:
167169
```bash
168170
git clone [email protected]:adamspd/django-appointment.git
169171
```
170172

171-
2. **Prepare .env File**: Create an `.env` file in the root directory of your project with your configuration settings.
172-
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):
173176

174177
```plaintext
175178
176179
EMAIL_HOST_PASSWORD=your_password
177180
```
181+
182+
> **Note:** The `.env` file is used to store sensitive information and should not be committed to version control.
183+
178184
3. **Build and Run the Docker Containers**: Run the following command to build and run the Docker containers:
179185

180186
```bash
@@ -201,9 +207,9 @@ Here's how you can set up Django-Appointment for local development or testing wi
201207
docker-compose exec web python manage.py migrate
202208
```
203209
204-
> **Note:** I use the default database settings for the Docker container. If you want to use a different database, you
205-
> can
206-
> 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.
207213
208214
## Customization 🔧
209215

appointment/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
__package_name__ = "django-appointment"
66
__url__ = "https://github.com/adamspd/django-appointment"
77
__package_website__ = "https://django-appt.adamspierredavid.com/"
8-
__version__ = "3.3.0"
8+
__version__ = "3.3.1"
99
__test_version__ = False

0 commit comments

Comments
 (0)