Getting Started with Django-Appointment
Django-Appointment is a flexible Django app for managing appointment scheduling. This guide will walk you through the basic setup process.
Installation
- Install Django-Appointment using pip:
- Add "appointment" to your
INSTALLED_APPS
insettings.py
:
- Include the appointment URLconf in your project's
urls.py
:
from django.urls import path, include
urlpatterns = [
# other urls
path('appointment/', include('appointment.urls')),
]
Configuration
- In your
settings.py
, configure the user model (if using a custom one):
- Set the website name:
- For email reminders (optional), configure Django Q:
Q_CLUSTER = {
'name': 'DjangORM',
'workers': 4,
'timeout': 90,
'retry': 120,
'queue_limit': 50,
'bulk': 10,
'orm': 'default',
}
USE_DJANGO_Q_FOR_EMAILS = True
For more configuration options, refer to this page.
Database Setup
- Create and apply migrations:
- Start the Django Q cluster (if using email reminders):
Initial Setup
- Start your Django development server:
-
Access the admin panel at
http://127.0.0.1:8000/admin/
to create services, manage configurations, and handle appointments. -
Create at least one service before using the application.
-
Access the appointment booking page at
http://127.0.0.1:8000/appointment/request/<service_id>/
.
Template Configuration
Ensure your base template includes the following blocks:
{% block customCSS %}{% endblock %}
{% block title %}{% endblock %}
{% block description %}{% endblock %}
{% block body %}{% endblock %}
{% block customJS %}{% endblock %}
Note: At minimum, the customCSS
, body
, and customJS
blocks are required. jQuery is also necessary for proper functionality.
Customization
You can override default settings in your settings.py
.
Next Steps
- Explore the admin interface to manage services, staff, and appointments.
- Customize the appearance and behavior by overriding templates and extending views.
- Implement additional features like payment integration or custom notifications.