# Holistica Python 3.9 compatibility build — TESTING ONLY

This is a dependency adaptation of V24 for a Python 3.9 cPanel Passenger WSGI environment. Python 3.9 and Django 4.2 are no longer security supported as of October 2026. **Do not use with real patient/EMR data or public production traffic.** Move to Python 3.12+ and supported Django for production.

## Changes
- Replaced the Django 6 / modern package lockfile with a minimal Python 3.9-compatible dependency set.
- Removed Daphne from `INSTALLED_APPS` for the cPanel WSGI process. Channels remains installed for existing imports.
- Left models, migrations, views, templates, static service images, and URLs intact.
- No database or `.env` is included or modified.
- Optional ASGI dependencies are in `requirements-asgi-optional.txt` but normal cPanel Passenger does not host WebSockets.

## Test setup (on a non-production copy)
1. Activate the Python 3.9 virtualenv from cPanel Setup Python App.
2. Run `python -m pip install --upgrade 'pip<26'` then `python -m pip install -r requirements-cpanel.txt`.
3. For MySQL, confirm MySQL client headers and run `python -m pip install 'mysqlclient==2.1.1'` (may require host support). Do NOT switch DB engines or migrate a live database blindly.
4. Supply private `.env` and test with a **copy** of your database. Run `python manage.py check` and `python manage.py migrate --plan` before considering any migration.
5. Test staff logins, EMR permissions, booking, payments, media, and static images in staging.
6. `python manage.py collectstatic --noinput` after confirming static/media directory configuration.

## Limitations
- Compatibility of all Django 6 application behavior with Django 4.2 is not established by static syntax checks.
- WebSocket/live chat features require a separate ASGI host; WSGI alone cannot serve them.
- Do not execute `migrate` on a live database until migrations and backups have been validated.
- For a healthcare production service, upgrade hosting to supported Python and Django first.
