Repository navigation
Releases
v1.30.0
Features
-
Extra tables in backups. Backups can now hold tables no Django model
owns, such as Umami's analytics tables in the same PostgreSQL database.
Name them in the newBACKUP_TABLESsetting as table names or patterns
("website*", or"umami.*"for a whole schema), for every database or
per alias. Their rows are saved beside the fixture in
<name>.tables.gz(withCOPYon PostgreSQL, as JSON elsewhere), which
stays a plainloaddatafile, and a restore empties and loads them in
the same transaction as the Django data. The Backups page names a
backup's extra tables with a download link, and the restore dialog lists
them with their rows, marks tables that are gone or lack a backed-up
column (Restore anyway leaves those as they are) and has Leave the
extra tables as they are;content_studio_restorehas--skip-tables.
content_studio.E050also reports aBACKUP_TABLESthat is not a list. -
Maintenance commands on the status page. A Maintenance card on
System status runs Content Studio's maintenance commands: make image
sizes, make thumbnails, read media metadata, publish scheduled content,
deliver webhooks, send the notification digest, back up the database and
clean up old data, each registered when the app it needs is installed.
Commands with options, or that delete data, ask first: the clean-up
dialog has a box per kind of old data with how many records it would
delete now. With a background task backend a run goes to the task queue
and shows in Recent tasks; without one it runs in the request, and the
long media commands warn that a big library may time out. Each command
keeps its latest run, with who started it, how long it took and the end
of its output (64 KB), and runs one at a time. Superusers run them by
default; overrideContentStudioSite.has_command_permission(request, command)to change that. Apps add their own with
status.register_command(). Runmigrate: the status app now has a
table for the latest runs.
Fixes
-
React Router 7.18.7. Updates the frontend's React Router from
7.18.4 for two advisories (GHSA-2rq8-3rm6-2w8f, GHSA-qhgm-jj2j-75wj)
in its server rendering and framework-mode data streaming, which Content
Studio does not use. -
Media sizes stored in KB. Media items whose size was stored in
another unit than bytes, such as by an import from an older site, showed
a size far too small ("2.98KB" for a 3 MB photo).
content_studio_media_metadatanow reads the file size again from
storage, in bytes, for every item it reads: run it with--allto put
existing items right.
v1.29.0
Features
- Dependent choices. A field's options can now depend on another value
of the same form, like django-smart-selects in the classic admin: once
an editor picks a country, the city picker only offers that country's
cities.Field("city", limit_choices_to=Q(country=F("country")))takes
aQobject over the related model in whichF("<field>")reads a
form value, forForeignKeyandManyToManyFieldpickers. While the
value it reads is empty the field is disabled, with "Choose Country
first" under it;
when that value changes, a chosen city that no longer fits is cleared
with a note under the field, and "New city" in the picker starts with
the chosen country. Saving rejects a value that does not fit the
submitted values (values that stay as they are keep saving). For rules
aQcannot express, subclasscontent_studio.form.ChoiceFilter
(fieldsandfilter(queryset, values, request)); fields with choices
takeDependentChoices("land", {"nl": [...], "be": [...]}). Inline
studios take the sameField, and blocks declare
Meta.limit_choices_to. The studio hookget_related_<field>is now
documented as the low-level way to return a picker's options. New
checks:content_studio.E071for a limit that cannot work and
content_studio.W046for a limit that reads a field not on the edit
page.
v1.28.0
Features
- PostgreSQL fields. The fields of
django.contrib.postgresnow get a
widget and a format by default. AnArrayFieldis edited as rows
(ListWidget) that take numbers, dates or times as its base field does
and stop at itssize, and shows its items as pills; anArrayField
whose base field has choices is a multi-select of them. AnHStoreField
is edited as key and value rows (KeyValueWidget) and shows as
"key: value" pills (newKeyValueFormat).IntegerRangeField,
BigIntegerRangeFieldandDecimalRangeFieldare edited with the new
RangeWidget, a from and a to box where either may stay empty for an
open end, and show as 1–5, ≥ 18 or ≤ 9 (newRangeFormat). An integer
range includes its "to" number (1 to 5 is saved as[1,6)); a decimal
range keeps its end exclusive. Exports show ranges as text, and the
export for import writes them so they import again. ADateRangeField
gets the date range picker (DateRangeWidget,DateRangeFormat) with
an inclusive last day, and aDateTimeRangeFieldgetsRangeWidget
with two date and time pickers. - Month fields.
content_studio.fields.MonthFieldstores a month of a
year, such as an expiry date or the month an issue came out. It is a
DateFieldthat always saves the first day of the month, so sorting,
date filters and lookups such as__yearkeep working; text may name
the month alone ("2026-03"). Its widget,MonthWidget(min_date=None, max_date=None), shows the month in full and opens a grid of months
with a year stepper; the year opens a grid of twelve years, and This
month and Clear sit below. On a plainDateFieldthe widget saves the
first day of the picked month. The list page shows months as Mar 2026
(MonthFormat(style="long" | "short" | "numeric"), "long" in
read-only fields), filters them on a From and To month, and edits them
in place with the same grid. - Custom widgets and formats. Subclass
content_studio.widgets.CustomWidgetor
content_studio.formats.CustomFormatand setcomponentandjsto
edit or show a field with a React component of your own, in a JavaScript
module in your static files. The admin loads the module the first time a
page shows the widget or format. The module importsreactand the
admin's@content-studio/admin(registerWidget,registerFormat,
useLanguage) and@content-studio/ui(inputs, buttons, selects,
checkboxes, switches, badges, tooltips, popovers, dialogs, a spinner and
toasts) by name, so the component uses the admin's own React and looks
like the built-ins. Widgets get the same props as the built-ins, plus
setError(message), which blocks Save while the input can't be saved.
get_options()reaches the component asoptions. A script that fails
to load or a component that throws shows the value as read-only text, and
the developer tools report it. Type declarations ship in
content_studio/static/content_studio/runtime/content-studio.d.ts. The
new checkcontent_studio.E069reports the base class used directly, a
subclass withoutcomponentorjs, a script no static files finder
has, and one name for two scripts. DateFormat,DateTimeFormatandMonthFormattakehighlight_past
andhighlight_future, each acontent_studio.formats.Highlight(color, label=None): a date, moment or month in the past or the future shows in
one of theBadgeFormatcolors, with the label on hover and for screen
readers, such ashighlight_past=Highlight("gray", _("Published"))and
highlight_future=Highlight("blue", _("Scheduled"))for a publish date.
Today, or the current month, is neither past nor future.- Date ranges.
DateRangeWidget(end_field=None, presets=None, min_date=None, max_date=None)picks a range of days in one control:
two months side by side, the first click picks the first day and the
second the last, with presets beside them (Today, Tomorrow, This week,
Next week, This month and Next month by default;presetspicks others
or[]hides them). On the first day'sDateFieldwithend_fieldit
fills both fields; an optional end field saves a first day alone as an
open range, and saving refuses a last day before the first. Without
end_fieldit edits one{"lower", "upper"}value, such as a Postgres
DateRangeField's.DateRangeFormat(end_field=None, style="medium", show_length=False)shows a range the short way (Dec 3 – 9, 2026; From
Dec 3, 2026 for an open end), and the column of a two-field range shows
it by itself. Itshighlight_past,highlight_futureand
highlight_currenttake aHighlightfor a range that ended before
today, starts after today or includes today.content_studio.filters.DateRangeFilter("starts_on", "ends_on")filters the list on the days a range overlaps, where an
empty end counts as still running. All date filters now offer presets
(Today, Last 7 days, Last 30 days, This month, Last month, Next 7 days,
Next 30 days and This year) and pick the range on two months. The new
checkcontent_studio.E070reports a range widget, format or filter
that cannot work.
Bug fixes
MapWidget(lng_field=...)now saves the longitude field: the edit
page sent it, but the field was not among the ones a save writes.
v1.27.0
Features
- Audit log. A new page,
content_studio.contrib.audit_log, puts every
change in the activity log and every sign-in on one timeline, newest
first: who created, changed, deleted, restored, moved, published or
unpublished what, and who signed in, failed to sign in (with the reason)
or signed out, with the method, IP address and browser. Filter by user,
model, object, action, period and text (the filters live in the URL),
open an update's field changes with the history app, also for deleted
objects, and export what the filters show as CSV or Excel. Superusers
open it from the user menu; the dashboard's Activity widget and the
edit page's Activity card link to it with View all. Override
has_audit_log_permission(request)on the admin site to let others in.
While the app is installed, new activity log entries keep their real
action (Django's flags tell only added, changed and deleted apart).
New settingAUDIT_LOG_KEEP_DAYS(None, keep everything) prunes old
entries, sign-ins and their history versions after a sign-in, at most
hourly, and withmanage.py content_studio_prune_audit_log.
manage.py checkreports a setting that cannot work with
content_studio.E067. - Content Studio's login views now send
user_logged_inand
user_login_failedwithmethodandreasonarguments, send
user_logged_outon sign-out, and run outsideATOMIC_REQUESTS. - Branding. The admin site takes a
site_logo(andsite_logo_dark
for the dark theme), asite_favicon, anaccent_color(and
accent_color_dark) and alogin_text. The logo replaces the letter
mark in the main menu and the Content Studio logo on the login pages; the
accent color replaces the primary color in both themes, with black or
white text, whichever reads better, and is rendered with the page so the
admin never flashes its own colors first; the login text replaces the
line under the login page's title. - Environment badge. The new
ENVIRONMENTsetting shows a badge with
the environment's name beside the site header, on the login pages and in
front of the browser tab's title ("[Staging] Northbound CMS"), and a dot
on the logo in the collapsed menu. A name such as"staging"or
"development"picks the label and color,"production"shows none,
and a dict sets your own label and color. Overrideget_environmenton
the site to pick it per request. Environment settings read the
ENVIRONMENTvariable and use it forSENTRY_ENVIRONMENTtoo. - New checks:
content_studio.E068(an accent color orENVIRONMENTthat
cannot be shown),content_studio.W044(a logo or favicon static file
that does not exist) andcontent_studio.W045(an accent color with less
than 3:1 contrast against a theme's background).
Fixes
- The browser tab shows the site's
site_titleinstead of always "Django
Content Studio".
v1.26.0
Features
- Captcha. A self-hosted captcha for your site's public forms,
content_studio.contrib.captcha: the visitor's browser solves a small
proof of work (the Cap protocol), with no third party and no tracking.
Includecontent_studio.contrib.captcha.urlsoutside the admin, at any
path (api/cap/in the docs), and addCaptchaFieldto a Django form
(content_studio.contrib.captcha.forms, rendered with{{ form.media }})
or to a serializer (content_studio.contrib.captcha.fields), or call
verify_captcha(token). A token is valid once and for 20 minutes.
CAPTCHA_CSPlists what the page's Content-Security-Policy must allow.
New settingsCAPTCHA(off passes every check and renders no widget),
CAPTCHA_CHALLENGES(50),CAPTCHA_DIFFICULTY(4) and
CAPTCHA_THROTTLE_RATE("30/minute"per IP address);configure()
reads theCAPTCHA(on/off) andCAPTCHA_THROTTLE_RATEenvironment
variables.captcha_token()fromcontent_studio.contrib.captcha.testing
gives your tests a valid token.CaptchaStatisticWidget
(content_studio.contrib.captcha.dashboard) shows on the dashboard how
many challenges visitors solved over 7, 30 or 90 days, with the trend, a
sparkline and the failed attempts in the footnote. Backups leave captcha challenges and
tokens out.manage.py checkreports a captcha setting that cannot work
withcontent_studio.E066, and the app's URLs missing with
content_studio.W043. The widget (@cap.js/widget0.1.58) and solver
(@cap.js/wasm0.0.8) are vendored under the Apache License 2.0. - Notification digest and pruning on Huey. With Huey installed, the
worker sends the notification digest every hour at :10 (when
NOTIFICATION_EMAIL_DIGESTandADMIN_URLare set) and prunes
notifications daily at 04:30 (NOTIFICATION_RETENTION), each under a lock
so two workers never run it at once. WithTASKS_URL=db://a project now
needs only its database: no Redis and no cron. Both tasks show on the
system status page with their last run, from Huey or cron. Remove the cron
lines forcontent_studio_send_notification_digestand
content_studio_prune_notificationswhen you move to Huey.
Fixes
- The scheduled publishing run showed twice on the system status page with
Huey: once by its Huey name and once as Scheduled publishing.
v1.25.0
Features
- Environment settings.
content_studio.contrib.settings.configure()
builds a project's settings from environment variables with one call near
the top ofsettings.py:configure(globals(), base_dir=BASE_DIR).
DJANGO_SECRET_KEYis required.DJANGO_DEBUG,SITE_URL,
BACKEND_URLandALLOWED_HOSTSset the hosts and CSRF origins.
DATABASE_URL(postgres://,sqlite:///) sets the database, with psycopg's
pool forDATABASE_POOL=1, andCACHE_URL(locmem://,db://,
redis://,valkey://) the cache.TASKS_URL(db://,redis://,
immediate://) sets Huey and Django'sTASKS, and adb://queue keeps
itshuey_*tables in the database.EMAIL_URL(console://,smtp://,
smtp+tls://,smtps://) sets mail, andMEDIA_URL,MEDIA_ROOTand the
S3_*variables set storage, with WhiteNoise for static files. HTTPS
settings followSITE_URLandNUM_PROXIES, and the media library, image
sizes andADMIN_URLget defaults. Settings assigned after the call
override it, andCONTENT_STUDIO,REST_FRAMEWORKandHEADLESS
assigned before it are merged over the defaults one level deep. Your own
sections read more variables (sections=[...]). Installing the
content_studio.contrib.settingsapp creates thedb://cache and queue
tables onmigrateand adds the deploy checkscontent_studio.E065
(DEBUGon),W040(a placeholder or weak secret key, in place of
Django'ssecurity.W009),W041(a per-process cache) andW042
(httpswithoutNUM_PROXIES). New extras:[server](psycopg with its
pool, the Redis client and WhiteNoise) and[s3](django-storages). - Logging from the environment.
configure()setsLOGGINGwith
logging_settings()fromLOG_FORMAT(json, orplainwith
DJANGO_DEBUGon),LOG_LEVEL(INFO) andLOG_ACCESS(the access log,
on whileDEBUGis off); an unknown format or level stops startup with
an error that names the variable. AddRequestIdMiddlewarefirst in
MIDDLEWAREyourself. - Quiet heartbeat.
logging_settings()leaves out Huey'sINFOlines
about hidden tasks, so the worker heartbeat no longer writes three lines
a minute; their warnings and errors still show. The filter is
content_studio.logs.QuietTasksFilter, for aLOGGINGof your own.
v1.24.0
Features
- Health checks. Include
content_studio.health.urlsat the root of
your site for the endpoints a container orchestrator calls:/healthz
answers when the process is up,/readyzchecks the database
(SELECT 1) and the cache (a set and a get), and/statuszadds the
worker. Each check answersok,errororoff, onlyerrormakes the
answer503, and the answers need no login and carry no details.
content_studio.health.middleware.HealthCheckMiddleware, placed above
SecurityMiddleware, answers/healthzand/readyzbefore Django
checks the Host header, so a healthcheck on the container's internal IP
works. A worker heartbeat stamps the cache every minute and when a worker
starts; with Huey it runs on Huey's consumer by itself, stays out of the
recent runs and periodic tasks on the task dashboard and status page, and
out of Huey's stats records. Other backends call
content_studio.health.beat()from their own scheduler. The worker is
offwhen tasks run in the request or the cache is per process, and an
errorwhen its heartbeat is older thanHEALTH_WORKER_STALE_AFTER
(180 seconds).manage.py content_studio_worker_aliveexits with1
then, for the worker container's healthcheck. The system status page
gains a Worker row and its Database and Cache rows run the same checks.
TaskAdapterhas three new optional methods,
register_periodic_task(),on_worker_startup()and
runs_in_request(), whichHueyAdapterimplements.manage.py check
warns withcontent_studio.W036when the middleware comes after
SecurityMiddlewareorCommonMiddleware, and with
content_studio.W037when tasks run on workers but the default cache is
per process. - Error reports. Content Studio can report server errors while
DEBUG
is off. Off by default; setERROR_REPORTSto"email"and every new
line logged atERRORor above (a 500, a failed task, your own
logger.error()) is mailed toERROR_EMAIL, or the active superusers,
and with the notifications app is a "Server errors" notification of the
superusers. The same error (logger, exception type and line) is reported
at most once an hour, and its unread notification counts up instead of
repeating. Set it to"sentry"and errors go to Sentry with
SENTRY_DSN,SENTRY_ENVIRONMENT,SENTRY_RELEASEand
SENTRY_TRACES_SAMPLE_RATE, tagged with the request ID and without
personal data; installdjango-content-studio[sentry]. Every setting
takes the plain string an environment variable gives. The system status
page shows an Error reports row and, in email mode, a Recent errors card
with the viewer's latest 8 error notifications.manage.py checkreports
a setting that cannot work ascontent_studio.E064, warns with
content_studio.W038when Django'smail_adminswould mail every error
too, and withcontent_studio.W039for Sentry mode without a DSN. - Logging.
content_studio.logsaddsRequestIdMiddleware, which
gives each request an ID (a plain forwardedX-Request-ID, or a new one),
returns it in the response, puts it on every log line and writes one
access log line per request oncontent_studio.access(successful health
checks left out).logging_settings("json")builds aLOGGINGsetting
with JSON or plain lines and the request ID;JsonFormatter,
PlainFormatter,RequestIdFilterandget_request_id()work in your
own.
v1.23.0
Features
- Email activity. The new
content_studio.contrib.email_activityapp
logs every email the site sends: from, to, cc, bcc, subject, status,
timestamps, duration, size, attachment names and the error of a failed
send. The body is never stored. SetEMAIL_BACKENDto
content_studio.contrib.email_activity.backends.EmailBackend(or use it
as aMAILERSbackend on Django 6.1) and it delivers through
EMAIL_DELIVERY_BACKEND, Django's SMTP backend by default. Superusers
open the Email activity page from the Email row on the system status
page, filter by status and kind, search, open an email's details and
Send test email to their own address or another. The Email row now
shows the emails sent in the last 24 hours and is degraded when any
failed. Content Studio's own emails carry a kind (invite, password
link, password reset, two-factor reset, email changed, notification
digest, test); tag yours withemail_kind()or the
X-Content-Studio-Kindheader. Emails are kept for
EMAIL_ACTIVITY_KEEP_DAYS(30) and pruned after sending or with
content_studio_prune_emails;EMAIL_ACTIVITY_MASKstores addresses as
s***@example.comwithout subjects.has_email_activity_permission()
on the admin site decides who sees the page.manage.py checkreports
a bad setup ascontent_studio.E062, and warns with
content_studio.W035when the app is installed but email does not go
through the logging backend.
Fixes
- Logged out after an hour away. Once the access token expired
(TOKEN_LIFETIME, an hour by default), the admin's next request
refreshed it, but the refresh still carried the expired token in its
Authorizationheader and the refresh endpoint refused it, so the
admin signed the user out although the session was still valid. This
happened most often when coming back to a tab after a while. The
refresh endpoint now ignores theAuthorizationheader and the admin
no longer sends it there. - Logged out by two tabs renewing at once. Each renewal replaces the
session cookie, and a cookie presented again ends the session as
copied. Two tabs renewing at the same moment both presented the same
cookie, so the second one ended the session in every tab. Tabs of a
browser now take turns renewing, and a cookie presented again within
10 seconds of its renewal still renews the session, which also covers
a renewal whose response was lost. The new
REFRESH_TOKEN_REUSE_INTERVALsetting sets the window (0orNone
for none);manage.py checkreports a malformed value as
content_studio.E063. - Backup and restore messages translated. The backup and restore
strings added in 1.18.0 are now translated into every language.
v1.22.1
Fixes
- Filters on text fields without choices. A
CharFieldorTextField
withoutchoicesinlist_filter("city","author__username") was
listed in the Filter menu but showed nothing when picked. It now gets a
searchable list of the values in the table, like the classic admin's
AllValuesFieldListFilter: the first 100, with search to find the
others, and editors can pick several. The values come from the list
itself, so other tenants and trashed objects stay out. A field the list
page has no filter for (JSON, files, media) is left out of the menu, and
manage.py checkwarns about it ascontent_studio.W034. Filter values
may now contain commas, in custom filter options too. - Filter chips stay compact. A filter with several values shows the
first and "+2 more", so its chip no longer runs across the toolbar. - Remove a filter picked without a value. A filter added from the
Filter menu now sits in a bordered chip with an X until it gets a
value, so a date range (or any other filter) picked by mistake can be
taken away again. - Wider pickers. The search pickers of relation and text filters are
at least 18rem and at most 24rem wide, so short filter names no longer
squeeze their options.
v1.22.0
Features
- Skeleton loaders instead of spinners. The list page shows its header,
tabs, search, filters and view toggles at once, and while the first page
loads, the table shows its own column names over placeholder rows (the
list, gallery and media library views have their own). The edit page,
in a dialog too, shows its tabs, card titles and field labels with a
placeholder for each value, sized by its widget, and the trash list does
the same for its rows. A load quicker than 200 ms skips the skeleton, so
a fast page goes straight to its content. The pulse stops when the system
asks for reduced motion. Nothing to configure.