Version 3.13.0
Migration Guide for Version 3.13.0 🚀¶
Version 3.13.0 does not change the database: no model, field or constraint is added, renamed or removed, so there
is no migration to generate. It raises the minimum Python and Pillow versions, so check those first. The template,
form and email changes keep the old names, fields and folders working: if you use the package's pages and emails as
they are, upgrading is a pip install and a collectstatic. If you override the staff pages, the schedule forms or
the emails, read the steps after that.
Before you start: supported versions¶
Declared in setup.cfg |
3.12.0 | 3.13.0 |
|---|---|---|
python_requires |
>=3.10 |
>=3.11 |
| Django | >=4.2,<7.0 |
>=4.2,<7.0 |
Pillow |
>=10.4,<13.0 |
>=13.0,<14.0 |
| Tested combinations | Python 3.10 – 3.14, Django 4.2 – 6.1 | Python 3.11 – 3.14, Django 4.2 – 6.1 |
Python 3.10 is no longer accepted. pip will refuse to install 3.13.0 on it rather than installing something
broken, so if you are still on 3.10, stay on 3.12.0 until you can upgrade the interpreter. Pillow 13 fixes several
security vulnerabilities and does not support Python 3.10, so upgrading the interpreter is the only way to get those
fixes.
The compatibility matrix has the full grid of tested Python and Django combinations.
Steps for Upgrading to Version 3.13.0:¶
-
Check your Python version:
- Run
python --versionin the environment that serves your site. It must be 3.11 or newer. If you build a Docker image, check the base image too (python:3.10-slimhas to move to 3.11 or newer).
- Run
-
Check your Pillow pin:
- If your own requirements pin Pillow (
Pillow==12.3.0,Pillow<13), raise it to13.0or newer, or remove it and letpippick the version. Otherwisepipwill report a conflict.
- If your own requirements pin Pillow (
-
Backup Your Database:
- As a best practice, always back up your current database before an upgrade, even one without migrations.
-
Update Package:
- Upgrade to the latest version by running:
- Confirm Pillow was upgraded:
It should print
13.0.0or newer.
-
Check there is nothing to migrate:
- The package does not ship migration files, so confirm your own ones are up to date:
- It should report "No changes detected". If it proposes changes, they come from an earlier upgrade you have not migrated yet, not from 3.13.0: read that version's migration guide first.
-
Collect the static files:
- The calendar, service form, schedule form and confirm dialog scripts changed. If your site serves collected static files, run:
-
Check your schedule form overrides:
- If you override
manage_working_hours.htmlormanage_unavailability.html, nothing breaks: the*_rawfields are still read. But you can now post the plain field names (date,start_time,end_time,day_of_week) from<input type="date">and<input type="time">, and drop the hidden*_rawcopies. - Errors now come back as
{"errors": {"<field>": ["..."]}}with status 400. The package'sjs/app_admin/schedule_form.jsshows them under the fields; if you post the form with your own script, read that shape.
- If you override
-
Check your service and staff form overrides:
{{ form.services_offered }}now draws checkboxes. If you drew your own checkboxes by looping over the choices, nothing changes.{{ form.duration }}now draws two inputs,duration_hoursandduration_minutes. If your template draws its own input nameddurationwith anHH:MM:SSvalue, it keeps working. If your script readsform.elements.duration, read the two new inputs instead.
-
Check your email overrides:
- Your templates get more context now (see Custom templates); the keys they used keep
their values, with one exception: in the admin copy of
reminder_email.html,first_nameis empty. Useclient_first_nameif you showed the client's name to the admin. - Without an override, the password and verification emails are now HTML. If you relied on the plain-text body,
add your own
emails/password_reset.htmloremails/verification.html. - The links in the emails start with the request's address. Behind a proxy, check that Django's
USE_X_FORWARDED_HOSTandSECURE_PROXY_SSL_HEADERare set, as the set-password links already need. - Reminders queued before the upgrade still run, with relative links for the new
appointment_urlanddashboard_url; reminders scheduled after it get full links.
- Your templates get more context now (see Custom templates); the keys they used keep
their values, with one exception: in the admin copy of
-
Review and Test:
- Add or edit a service with an image, then book an appointment from start to finish.
- While booking, enter a wrong phone number: the error should show under the field.
- If your own code uses Pillow too, check it against Pillow 13: see Pillow's 13.0.0 release notes for what changed.
Optional follow-ups¶
- Move your overrides into folders:
custom/admin/for staff pages andcustom/booking/for client pages. - Drop copied code: an override that only changed a title or a button can now extend the default page and fill
djappt_headingordjappt_actions. A calendar override that only changed the height can useAPPOINTMENT_CALENDAR_OPTIONS. Views or context processors that worked out page titles can usepage_title. - Check your emails: with
DEBUG = True, openapp-admin/email-preview/as a superuser.
Troubleshooting:¶
pipsays the package requires a different Python:- Your environment runs Python 3.10 or older. Upgrade the interpreter (step 1), or stay on 3.12.0 for now.
pipreports a conflict on Pillow:- Something in your requirements pins Pillow below 13.0 (step 2).
- My override in
custom/is ignored:- A file with the same name in
custom/admin/orcustom/booking/wins. Remove one of them.
- A file with the same name in
- The calendar keeps its old height:
- Your
staff_index.htmloverride must print the options: add{{ calendar_options|json_script:"djappt-calendar-options" }}before the page's scripts.
- Your
- Issues Post Upgrade:
- Consult the release notes for the details of each change, and check the Django logs for error messages.
Important Notes 📝:¶
- As with any upgrade, testing in a development or staging environment before applying changes to your production environment is highly recommended.
- Upgrading from 3.11 or older? Read the 3.12 migration guide first: that release changed how the pages and emails are built.
- Upgrading from the 3.10 series or older? Read the 3.11 migration guide too: that release added a model, so it needs a migration.