Skip to content

KennedyRyan-code/django-appointment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Django-Appointment demo website

Django-Appointment is a flexible Django app for managing appointment scheduling. This guide will walk you through the basic setup process.

Create a virtual environment

python -m venv .venv

Activate the virtual environment

  • On Windows:
    .venv\Scripts\activate
  • On Unix or MacOS:
    source .venv/bin/activate

Installation

Install requirements

pip install -r requirements.txt

Run server

python manage.py runserver

Install Django-Appointment using pip (if not yet installed)

pip install django-appointment

Add "appointment" to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    # other apps
    'appointment',
    'django_q',  # Optional: for email reminders
]

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

AUTH_USER_MODEL = 'your_app.YourUserModel'  # Optional if using Django's default user model

Set the website name:

APPOINTMENT_WEBSITE_NAME = 'Your 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:

python manage.py makemigrations appointment
python manage.py migrate

Start the Django Q cluster (if using email reminders):

python manage.py qcluster

Initial Setup

Start your Django development server:

python manage.py runserver

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.

About

Django Appointment Scheduler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages