Skip to content

Commit 7b82ab4

Browse files
committed
Updated documentation
1 parent 59a24b7 commit 7b82ab4

File tree

3 files changed

+211
-49
lines changed

3 files changed

+211
-49
lines changed

README.md

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@
1414
⚠️ **IMPORTANT**: If upgrading from a version before 2.x.x, please note significant database changes were introduced in
1515
Version 2.0.0 introduces significant database changes. Please read
1616
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_0.md) before
17-
updating. No database changes were introduced in version 3.0.1.
17+
updating. Version 3.1.0 introduces the ability to send email reminders for appointments using Django Q for efficient
18+
task scheduling.
1819

1920
Django-Appointment is a Django app engineered for managing appointment scheduling with ease and flexibility. It enables
2021
users to define custom configurations for time slots, lead time, and finish time, or utilize the default values
2122
provided. This app proficiently manages conflicts and availability for appointments, ensuring a seamless user
2223
experience.
2324

24-
For a detailed walkthrough and live example of the system, please refer to
25+
For a detailed walkthrough and live example of the system, please refer to
2526
[this tutorial](https://github.com/adamspd/django-appointment/tree/main/docs/explanation.md).
2627

2728
Detailed documentation can be found in
2829
the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs/README.md).
29-
For changes and migration information, please refer to the [release
30-
notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md).
30+
For changes and migration information, please refer to the release
31+
notes [here](https://github.com/adamspd/django-appointment/releases)
32+
and [here](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes).
3133

3234
## Features ✨
3335

@@ -36,50 +38,19 @@ notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_note
3638
3. Seamless integration with the Django admin interface for appointment management.
3739
4. Custom admin interface for managing appointment/staff member editing, creation, availability, and conflicts.
3840
5. User-friendly interface for viewing available time slots and scheduling appointments.
39-
6. Capability to send email notifications to clients upon scheduling an appointment.
41+
6. Capability to send email notifications to clients upon scheduling an appointment and email reminders for
42+
appointments, leveraging Django Q for task scheduling and efficiency.
4043

4144
## Key features introduced in previous versions.
4245

4346
- For more information, please refer to
44-
this [documentation](https://github.com/adamspd/django-appointment/tree/main/docs/history/readme_v2_1_1.md).
47+
this [documentation](https://github.com/adamspd/django-appointment/tree/main/docs/history).
4548

46-
## Added Features in version 3.0.1
49+
## Added Features and Bug Fixes in version 3.1.0
4750

48-
This release of Django Appointment brings a series of improvements and updates aimed at enhancing the overall
49-
functionality and user experience:
50-
51-
1. **Dynamic Appointment Management (#49, #55)**
52-
53-
2. **User Interface Enhancements and JavaScript Refactoring (#55)**
54-
55-
3. **Dynamic Label Customization in Appointment Pages (#19)**
56-
57-
4. **Updated Documentation and Workflow Enhancements (#25, #26, #27)**
58-
59-
5. **Community Engagement and Standards (#21, #22, #23, #24)**
60-
61-
6. **Library Updates and Security Patches (#14, #15, #18)**
62-
63-
7. **Enhanced Project Visibility (#16)**
64-
65-
8. **Translation Refinements (#31)**
66-
67-
9. **Bug Fixes (#48)**
68-
69-
See more at the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md).
70-
71-
These updates collectively contribute to the robustness and versatility of the Django Appointment package, aligning with
72-
our commitment to providing a high-quality and user-friendly appointment management solution.
73-
74-
### Bug Fixes 🆕
75-
76-
See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md)
77-
for more information.
78-
79-
### Breaking Changes in version 3.0.1:
80-
81-
See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md) for more
82-
information.
51+
See the [release notes](https://github.com/adamspd/django-appointment/releases/tag/v3.1.0).
52+
For older version,
53+
see their [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes).
8354

8455
## Quick Start 🚀
8556

@@ -89,6 +60,7 @@ See the [release notes](https://github.com/adamspd/django-appointment/tree/main/
8960
INSTALLED_APPS = [
9061
# other apps
9162
'appointment',
63+
'django_q',
9264
]
9365
```
9466

@@ -102,7 +74,6 @@ See the [release notes](https://github.com/adamspd/django-appointment/tree/main/
10274
path('appointment/', include('appointment.urls')),
10375
]
10476
```
105-
10677
3. In your Django's `settings.py`, append the following:
10778

10879
```python
@@ -146,13 +117,29 @@ See the [release notes](https://github.com/adamspd/django-appointment/tree/main/
146117
<p>® 2023 {{ APPOINTMENT_WEBSITE_NAME }}. All Rights Reserved.</p>
147118
```
148119

149-
4. Execute `python manage.py migrate` to create the appointment models.
150-
5. Launch the development server and navigate to http://127.0.0.1:8000/admin/ to create appointments, manage
120+
Configure `Q_CLUSTER` in your Django's `settings.py` to enable Django Q task scheduling:
121+
```python
122+
Q_CLUSTER = {
123+
'name': 'DjangORM',
124+
'workers': 4,
125+
'timeout': 90,
126+
'retry': 120,
127+
'queue_limit': 50,
128+
'bulk': 10,
129+
'orm': 'default',
130+
}
131+
```
132+
133+
4. Run `python manage.py migrate` to create the appointment models.
134+
135+
5. Start the Django Q cluster with `python manage.py qcluster`.
136+
137+
6. Launch the development server and navigate to http://127.0.0.1:8000/admin/ to create appointments, manage
151138
configurations, and handle appointment conflicts (the Admin app must be enabled).
152-
6. You must create at least one service before using the application on the admin page. If your service is free, input 0
139+
7. You must create at least one service before using the application on the admin page. If your service is free, input 0
153140
as the price. If your service is paid, input the price in the price field. You may also provide a description for
154141
your service.
155-
7. Visit http://127.0.0.1:8000/appointment/request/<service_id>/ to view the available time slots and schedule an
142+
8. Visit http://127.0.0.1:8000/appointment/request/<service_id>/ to view the available time slots and schedule an
156143
appointment.
157144

158145
## Customization 🔧
@@ -186,7 +173,7 @@ information.
186173

187174
## Notes 📝⚠️
188175

189-
Currently, the application does not send email reminders yet. I'm also working on a testing website for the application
176+
I'm working on a testing website for the application
190177
that is not fully functional yet, no hard feelings. But you can check it out
191178
at [https://django-appt.adamspierredavid.com/](https://django-appt.adamspierredavid.com/). Ideas are welcome here since
192179
I'm blocked on a few points.

docs/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ staff member, and payment type for the appointment.
3838

3939
The appointment request is used to create the appointment. An appointment is considered having more information than
4040
that, and since we don't want to overload the appointment model, we use the appointment request to store all
41-
the information about the appointment.
41+
the information about the appointment.
4242
[More details here](https://github.com/adamspd/django-appointment/blob/main/docs/models.md#appointmentrequest).
4343

4444
### Appointment
@@ -106,6 +106,24 @@ APPOINTMENT_LEAD_TIME = (9, 0) # Start time of the appointment slots (in 24-hou
106106
APPOINTMENT_FINISH_TIME = (16, 30) # End time of the appointment slots (in 24-hour format)
107107
```
108108

109+
For email reminders with Django Q, you can configure the following settings after adding `django_q` to
110+
your `INSTALLED_APPS`:
111+
112+
```python
113+
Q_CLUSTER = {
114+
'name': 'DjangORM',
115+
'workers': 4,
116+
'timeout': 90,
117+
'retry': 120,
118+
'queue_limit': 50,
119+
'bulk': 10,
120+
'orm': 'default',
121+
}
122+
```
123+
124+
If those settings are not provided, the application won't send email reminders. You also have to
125+
run `python manage.py qcluster` to start the Django Q cluster.
126+
109127
### Django Default Settings Utilization:
110128

111129
The application leverages some of the default settings from your Django project.
@@ -130,6 +148,7 @@ It has been replaced with a more flexible approach, allowing for custom user mod
130148
from django.apps import apps
131149
from django.conf import settings
132150

151+
133152
def get_user_model():
134153
"""
135154
Fetch the client model from the settings file.

docs/history/readme_v3_0_1.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Django Appointment 📦
2+
3+
![Tests](https://github.com/adamspd/django-appointment/actions/workflows/tests.yml/badge.svg)
4+
![Published on PyPi](https://github.com/adamspd/django-appointment/actions/workflows/publish.yml/badge.svg)
5+
[![PyPI version](https://badge.fury.io/py/django-appointment.svg)](https://badge.fury.io/py/django-appointment)
6+
[![codecov](https://codecov.io/gh/adamspd/django-appointment/branch/main/graph/badge.svg?token=ZQZQZQZQZQ)](https://codecov.io/gh/adamspd/django-appointment)
7+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8+
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/commits/main)
9+
[![GitHub last commit](https://img.shields.io/github/last-commit/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/commit/main)
10+
[![GitHub issues](https://img.shields.io/github/issues/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/issues)
11+
[![GitHub pull requests](https://img.shields.io/github/issues-pr/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/pulls)
12+
[![GitHub contributors](https://img.shields.io/github/contributors/adamspd/django-appointment)](https://github.com/adamspd/django-appointment/graphs/contributors)
13+
14+
⚠️ **IMPORTANT**: If upgrading from a version before 2.x.x, please note significant database changes were introduced in
15+
Version 2.0.0 introduces significant database changes. Please read
16+
the [migration guide](https://github.com/adamspd/django-appointment/tree/main/docs/migration_guides/v2_1_0.md) before
17+
updating. No database changes were introduced in version 3.0.1.
18+
19+
Django-Appointment is a Django app engineered for managing appointment scheduling with ease and flexibility. It enables
20+
users to define custom configurations for time slots, lead time, and finish time, or utilize the default values
21+
provided. This app proficiently manages conflicts and availability for appointments, ensuring a seamless user
22+
experience.
23+
24+
For a detailed walkthrough and live example of the system, please refer to
25+
[this tutorial](https://github.com/adamspd/django-appointment/tree/main/docs/explanation.md).
26+
27+
Detailed documentation can be found in
28+
the [docs' directory](https://github.com/adamspd/django-appointment/tree/main/docs/README.md).
29+
For changes and migration information, please refer to the [release
30+
notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md).
31+
32+
## Features ✨
33+
34+
1. Customizable time slots, lead time, and finish time.
35+
2. Competent handling of appointment conflicts and availability.
36+
3. Seamless integration with the Django admin interface for appointment management.
37+
4. Custom admin interface for managing appointment/staff member editing, creation, availability, and conflicts.
38+
5. User-friendly interface for viewing available time slots and scheduling appointments.
39+
6. Capability to send email notifications to clients upon scheduling an appointment.
40+
41+
## Key features introduced in previous versions.
42+
43+
- For more information, please refer to
44+
this [documentation](https://github.com/adamspd/django-appointment/tree/main/docs/history/readme_v2_1_1.md).
45+
46+
## Added Features in version 3.0.1
47+
48+
This release of Django Appointment brings a series of improvements and updates aimed at enhancing the overall
49+
functionality and user experience:
50+
51+
1. **Dynamic Appointment Management (#49, #55)**
52+
53+
2. **User Interface Enhancements and JavaScript Refactoring (#55)**
54+
55+
3. **Dynamic Label Customization in Appointment Pages (#19)**
56+
57+
4. **Updated Documentation and Workflow Enhancements (#25, #26, #27)**
58+
59+
5. **Community Engagement and Standards (#21, #22, #23, #24)**
60+
61+
6. **Library Updates and Security Patches (#14, #15, #18)**
62+
63+
7. **Enhanced Project Visibility (#16)**
64+
65+
8. **Translation Refinements (#31)**
66+
67+
9. **Bug Fixes (#48)**
68+
69+
See more at the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md).
70+
71+
These updates collectively contribute to the robustness and versatility of the Django Appointment package, aligning with
72+
our commitment to providing a high-quality and user-friendly appointment management solution.
73+
74+
### Bug Fixes 🆕
75+
76+
See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md)
77+
for more information.
78+
79+
### Breaking Changes in version 3.0.1:
80+
81+
See the [release notes](https://github.com/adamspd/django-appointment/tree/main/docs/release_notes/latest.md) for more
82+
information.
83+
84+
## Quick Start 🚀
85+
86+
1. Add "appointment" to your `INSTALLED_APPS` setting like so:
87+
88+
```python
89+
INSTALLED_APPS = [
90+
# other apps
91+
'appointment',
92+
]
93+
```
94+
95+
2. Incorporate the appointment URLconf in your project's `urls.py` like so:
96+
97+
```python
98+
from django.urls import path, include
99+
100+
urlpatterns = [
101+
# other urls
102+
path('appointment/', include('appointment.urls')),
103+
]
104+
```
105+
106+
3. In your Django's `settings.py`, append the following:
107+
108+
```python
109+
AUTH_USER_MODEL = 'models.UserModel' # Optional if you use Django's user model
110+
```
111+
112+
For instance, if you employ a custom user model:
113+
114+
```python
115+
AUTH_USER_MODEL = 'client.UserClient'
116+
```
117+
118+
If you're utilizing the default Django user model, there's no need to add this line since Django automatically sets
119+
it to:
120+
121+
```python
122+
AUTH_USER_MODEL = 'auth.User'
123+
```
124+
125+
Ensure your `create_user` function includes the following arguments, even if they are not all utilized:
126+
127+
```python
128+
def create_user(first_name, email, username, last_name=None, **extra_fields):
129+
pass
130+
```
131+
132+
This function will create a user with a password formatted as: f"{APPOINTMENT_WEBSITE_NAME}{current_year}"
133+
134+
For instance, if you append this to your `settings.py`:
135+
136+
```python
137+
APPOINTMENT_WEBSITE_NAME = 'Chocolates'
138+
```
139+
140+
And the current year is 2023, the password will be "Chocolates2023". If `APPOINTMENT_WEBSITE_NAME` is not provided,
141+
the default value is "Website", rendering the password as "Website2023".
142+
143+
This name is also utilized in the footer of the emails sent to clients upon scheduling an appointment:
144+
145+
```html
146+
<p>® 2023 {{ APPOINTMENT_WEBSITE_NAME }}. All Rights Reserved.</p>
147+
```
148+
149+
4. Execute `python manage.py migrate` to create the appointment models.
150+
5. Launch the development server and navigate to http://127.0.0.1:8000/admin/ to create appointments, manage
151+
configurations, and handle appointment conflicts (the Admin app must be enabled).
152+
6. You must create at least one service before using the application on the admin page. If your service is free, input 0
153+
as the price. If your service is paid, input the price in the price field. You may also provide a description for
154+
your service.
155+
7. Visit http://127.0.0.1:8000/appointment/request/<service_id>/ to view the available time slots and schedule an
156+
appointment.

0 commit comments

Comments
 (0)