Public booking pages and a lightweight customer portal for Django bookings.
Project description
django-booking-ui
Public booking pages and a lightweight customer portal for Django projects that already have booking logic. This package stays UI-only: it renders services, available slots, booking forms, and a simple portal that calls your existing service functions.
What it does (and does not)
- ✅ Browse services and providers
- ✅ Select date/time from your slot source
- ✅ Confirm bookings via your
create_bookingservice - ✅ Portal: lookup by reference + email, cancel, reschedule
- ✅ Pluggable templates and minimal, responsive styling
- ❌ No payment handling
- ❌ No booking engine logic – you supply slots and booking services
Quick start
- Install
pip install django-booking-ui
- Add to
INSTALLED_APPS:
INSTALLED_APPS = [
# ...
"booking_ui",
]
- Configure URLs:
from django.urls import path, include
urlpatterns = [
# ...
path("", include("booking_ui.urls")),
]
- Configure settings (examples):
BOOKING_UI_SERVICE_MODEL = "services.Service"
BOOKING_UI_PROVIDER_MODEL = "providers.Provider"
BOOKING_UI_SLOTS_FUNC = "slots.selectors.list_available_slots"
BOOKING_UI_CREATE_BOOKING_FUNC = "bookings.services.create_booking"
BOOKING_UI_RESCHEDULE_FUNC = "bookings.services.reschedule_booking"
BOOKING_UI_CANCEL_FUNC = "bookings.services.cancel_booking"
BOOKING_UI_DATE_RANGE_DAYS = 30
BOOKING_UI_REQUIRE_PORTAL_EMAIL_MATCH = True
# Optional
BOOKING_UI_TENANT_MODEL = "tenants.Tenant"
BOOKING_UI_DEFAULT_TIMEZONE = None # falls back to current timezone
BOOKING_UI_BRANDING = {"site_name": "Bookings", "support_email": "support@example.com"}
BOOKING_UI_BOOKING_MODEL = "bookings.Booking" # used for portal lookups
URL structure
- Single-tenant:
/book/… - Multi-tenant (when
BOOKING_UI_TENANT_MODELis set):/t/<tenant_slug>/book/…
Routes include services list, service detail, schedule selection, confirm, success, and portal pages for lookup, cancel, and reschedule.
Template overrides
Templates live under booking_ui/ (e.g. templates/booking_ui/base.html, schedule.html, portal_detail.html). Override them by creating files with the same path in your project templates directory.
Integration hooks
- Slot retrieval:
BOOKING_UI_SLOTS_FUNC(service, provider, start, end, ...)→ iterable of slot objects/dicts with astartdatetime. - Booking creation:
BOOKING_UI_CREATE_BOOKING_FUNC(**data)should return a booking with areferenceattribute. - Reschedule/cancel:
BOOKING_UI_RESCHEDULE_FUNC(booking, start, ...)andBOOKING_UI_CANCEL_FUNC(booking, ...). - Portal lookup uses
BOOKING_UI_BOOKING_MODELto fetch byreference; email matching enforced when enabled.
Tests
Run the built-in suite with a single command:
python -m booking_ui.tests
You can also integrate with your runner of choice (e.g. python -m pytest booking_ui).
Publish to PyPI
- Set credentials (e.g.
TWINE_USERNAME/TWINE_PASSWORDorTWINE_API_TOKEN). - Run:
python upload_project.py
This installs build/twine if needed, builds the wheel/sdist, and uploads the contents of dist/.
Licence
MIT Licence. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_booking_ui-0.1.0.tar.gz.
File metadata
- Download URL: django_booking_ui-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a8480c51828015239c038b2684e68454de757f48c53a392003e897026477ab
|
|
| MD5 |
f864634bb2c1aaab4dc71db9c8246c5d
|
|
| BLAKE2b-256 |
8600687ce49730ab69cfba17f489dfe306c01587bc67ed55388e58011235e522
|
File details
Details for the file django_booking_ui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_booking_ui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
089bd007506105e7d0ff476a16a9468d1406dfffbd509d0e057c520f222d24ae
|
|
| MD5 |
02e0767081a505e79399ca42732b8917
|
|
| BLAKE2b-256 |
d03903cafe1f7fd0160bfdbf8bb9afa0a57d6c0e04cd6ba52fa118845ca95be7
|