# Online booking (Django)

An open-source online booking system for appointment businesses, built with Django 5.2 LTS, Python 3.12, PostgreSQL, htmx and Tailwind CSS, and set up for a dog grooming salon. Clients pick a service, a groomer or anyone available and a real free time, then get a private link to add it to their calendar or cancel; staff run the day and week diary, phone and walk-in bookings, clients and their dogs' notes, time off, prices, opening hours and shifts.

- Framework: Django (Python)
- Category: Apps / Booking and scheduling
- Creates: a server app and a PostgreSQL database on the Shared tier (1 GB)
- Plan: Lite or above
- Price: Free
- Author: Light Cloud
- Page: https://templates.light-cloud.com/apps/booking/booking-app-template-django
- Updated: 2026-11-21

## Features

- Free times from opening hours, each groomer's shifts, existing bookings plus clean-up time, time off, minimum notice and a booking window, on a 15-minute grid
- No double bookings: every booking, online or by staff, is re-checked in a transaction under a PostgreSQL advisory lock per day
- A three-step booking flow that works without JavaScript, and Anyone available gives the booking to the least-booked groomer that day
- A private manage link per booking with Add to calendar (.ics) and online cancelling up to 24 hours before by default
- Staff day diary with a column per groomer and a week view, click a free time to book a phone call or walk-in, move, cancel, done and no-show
- Clients matched by email, with notes per dog on coat, clips and temperament shown on Today and every booking
- Setup for services and prices, opening hours, groomers, shifts, time off with a clash warning and booking rules, with owner, manager and staff roles
- A Bristol Dog Grooming demo with 4 groomers, 12 services, 182 clients, 199 dogs and about 400 bookings, removed in one click

## What you need

- A paid plan: deploying creates a PostgreSQL database, which the Free plan does not include
- To run it locally: Python 3.12 with pip, and Docker for a local PostgreSQL; the CSS build downloads the Tailwind CLI once
- No API keys: it starts with nothing to configure, and the confirmation page shows the manage link
- Optional: RESEND_API_KEY and EMAIL_FROM to email confirmations, cancellations, staff invitations and password resets
- Optional: TZ for the shop's time zone, Europe/London by default, since hours, shifts and bookings are local times

## About

The shop's name, address, phone, policies, booking rules, services, prices, opening hours, groomers and shifts are all edited in the staff area under Setup, and Settings, Workspace clears the demo clients, dogs, bookings and groomers while keeping the price list. For another kind of business, rename the services and change the words groomer and dog in templates/booking/ and the FAQ in booking/public.py; prices show in pounds through the pence filter in booking/templatetags/booking_tags.py. No photos ship, so the home page leads with live next free times; add your own to static/ and templates/booking/home.html. The shift editor sets one shift per weekday although the data model supports split shifts, there are no SMS reminders or deposits, and booking emails through Resend have not been tested with a real key. Whoever signs up first becomes the owner and Django admin and after that staff join by invitation, so create the owner account straight after deploying; manage links and emails use APP_URL, which Light Cloud sets at each deploy.

## Variables

- `DJANGO_SECRET_KEY`: generated

## Questions

### How does a Django booking app stop double bookings?

Every booking, online or by staff, goes through one function that takes a PostgreSQL advisory lock for that day, re-reads the diary and checks the time is still free before it writes. A second client confirming the same time is sent back to pick another.

### Can clients book an appointment without creating an account?

Yes. Clients give their name, mobile number, email and their dog's name and get a private manage link instead of a password. Returning clients are matched by email, so the shop keeps one record per person and one per dog.

### Does the booking app send confirmation emails?

With RESEND_API_KEY set, clients get a confirmation with their manage link and a note when a booking is cancelled, and staff get invitations and password resets. Without a key the confirmation page shows the manage link and the server log prints each email.

### Can I use it for a hair salon, barber or other appointment business?

Yes. Rename the categories and services under Setup, add your staff and their shifts, change the shop details and the words groomer and dog in the templates. Booking rules such as the 15-minute start grid, 2 hours' notice and the cancellation window are settings.

### Can I host this Django booking app without Light Cloud?

Yes. It has no Light Cloud code: build the Dockerfile on any Docker host, or run pip install, the Tailwind script, collectstatic and gunicorn config.wsgi:application, with DATABASE_URL and DJANGO_SECRET_KEY set.
