PERLY GATE RESIDENCE DJANGO BACKEND

This is a backend-only deployment package for Namecheap cPanel Setup Python App.
It does not include the local SQLite database, secrets, or the virtual environment.

Recommended app settings:
- Python: 3.13 (Django 6.1 supports Python 3.13)
- Application root: perly_api (or another folder outside public_html)
- Application URL: an API subdomain such as api.YOUR-DOMAIN
- Startup file: passenger_wsgi.py
- Entry point: application

Install packages from requirements.txt, then set these app environment variables before starting:
DJANGO_SECRET_KEY=<a newly generated secret; do not share it>
DJANGO_ALLOWED_HOSTS=api.YOUR-DOMAIN
CORS_ALLOWED_ORIGINS=https://YOUR-DOMAIN,https://www.YOUR-DOMAIN
CSRF_TRUSTED_ORIGINS=https://YOUR-DOMAIN,https://www.YOUR-DOMAIN
DJANGO_DEBUG=False
DJANGO_COOKIE_SECURE=True

Then run these commands inside the app virtual environment and application root:
python manage.py migrate
python manage.py load_room
python manage.py collectstatic --noinput
python manage.py createsuperuser

The API routes are /api/rooms/ and /api/reservations/create/.
The booking page still needs the live API URL set after the API subdomain is active.
