Skip to content

Releases

v1.30.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 09:23

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 new BACKUP_TABLES setting 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 (with COPY on PostgreSQL, as JSON elsewhere), which
    stays a plain loaddata file, 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_restore has --skip-tables.
    content_studio.E050 also reports a BACKUP_TABLES that 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; override ContentStudioSite.has_command_permission(request, command) to change that. Apps add their own with
    status.register_command(). Run migrate: 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_metadata now reads the file size again from
    storage, in bytes, for every item it reads: run it with --all to put
    existing items right.

v1.29.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 09:17

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
    a Q object over the related model in which F("<field>") reads a
    form value, for ForeignKey and ManyToManyField pickers. 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
    a Q cannot express, subclass content_studio.form.ChoiceFilter
    (fields and filter(queryset, values, request)); fields with choices
    take DependentChoices("land", {"nl": [...], "be": [...]}). Inline
    studios take the same Field, and blocks declare
    Meta.limit_choices_to. The studio hook get_related_<field> is now
    documented as the low-level way to return a picker's options. New
    checks: content_studio.E071 for a limit that cannot work and
    content_studio.W046 for a limit that reads a field not on the edit
    page.

v1.28.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 07:55

Features

  • PostgreSQL fields. The fields of django.contrib.postgres now get a
    widget and a format by default. An ArrayField is edited as rows
    (ListWidget) that take numbers, dates or times as its base field does
    and stop at its size, and shows its items as pills; an ArrayField
    whose base field has choices is a multi-select of them. An HStoreField
    is edited as key and value rows (KeyValueWidget) and shows as
    "key: value" pills (new KeyValueFormat). IntegerRangeField,
    BigIntegerRangeField and DecimalRangeField are 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 (new RangeFormat). 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. A DateRangeField
    gets the date range picker (DateRangeWidget, DateRangeFormat) with
    an inclusive last day, and a DateTimeRangeField gets RangeWidget
    with two date and time pickers.
  • Month fields. content_studio.fields.MonthField stores a month of a
    year, such as an expiry date or the month an issue came out. It is a
    DateField that always saves the first day of the month, so sorting,
    date filters and lookups such as __year keep 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 plain DateField the 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.CustomWidget or
    content_studio.formats.CustomFormat and set component and js to
    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 imports react and 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 as options. 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 check content_studio.E069 reports the base class used directly, a
    subclass without component or js, a script no static files finder
    has, and one name for two scripts.
  • DateFormat, DateTimeFormat and MonthFormat take highlight_past
    and highlight_future, each a content_studio.formats.Highlight(color, label=None): a date, moment or month in the past or the future shows in
    one of the BadgeFormat colors, with the label on hover and for screen
    readers, such as highlight_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; presets picks others
    or [] hides them). On the first day's DateField with end_field it
    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_field it 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. Its highlight_past, highlight_future and
    highlight_current take a Highlight for 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
    check content_studio.E070 reports 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

Choose a tag to compare

@github-actions github-actions released this 28 Nov 13:50

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 setting AUDIT_LOG_KEEP_DAYS (None, keep everything) prunes old
    entries, sign-ins and their history versions after a sign-in, at most
    hourly, and with manage.py content_studio_prune_audit_log.
    manage.py check reports a setting that cannot work with
    content_studio.E067.
  • Content Studio's login views now send user_logged_in and
    user_login_failed with method and reason arguments, send
    user_logged_out on sign-out, and run outside ATOMIC_REQUESTS.
  • Branding. The admin site takes a site_logo (and site_logo_dark
    for the dark theme), a site_favicon, an accent_color (and
    accent_color_dark) and a login_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 ENVIRONMENT setting 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. Override get_environment on
    the site to pick it per request. Environment settings read the
    ENVIRONMENT variable and use it for SENTRY_ENVIRONMENT too.
  • New checks: content_studio.E068 (an accent color or ENVIRONMENT that
    cannot be shown), content_studio.W044 (a logo or favicon static file
    that does not exist) and content_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_title instead of always "Django
    Content Studio".

v1.26.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 09:42

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.
    Include content_studio.contrib.captcha.urls outside the admin, at any
    path (api/cap/ in the docs), and add CaptchaField to 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_CSP lists what the page's Content-Security-Policy must allow.
    New settings CAPTCHA (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 the CAPTCHA (on/off) and CAPTCHA_THROTTLE_RATE environment
    variables. captcha_token() from content_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 check reports a captcha setting that cannot work
    with content_studio.E066, and the app's URLs missing with
    content_studio.W043. The widget (@cap.js/widget 0.1.58) and solver
    (@cap.js/wasm 0.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_DIGEST and ADMIN_URL are set) and prunes
    notifications daily at 04:30 (NOTIFICATION_RETENTION), each under a lock
    so two workers never run it at once. With TASKS_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 for content_studio_send_notification_digest and
    content_studio_prune_notifications when 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

Choose a tag to compare

@github-actions github-actions released this 27 Nov 15:52

Features

  • Environment settings. content_studio.contrib.settings.configure()
    builds a project's settings from environment variables with one call near
    the top of settings.py: configure(globals(), base_dir=BASE_DIR).
    DJANGO_SECRET_KEY is required. DJANGO_DEBUG, SITE_URL,
    BACKEND_URL and ALLOWED_HOSTS set the hosts and CSRF origins.
    DATABASE_URL (postgres://, sqlite:///) sets the database, with psycopg's
    pool for DATABASE_POOL=1, and CACHE_URL (locmem://, db://,
    redis://, valkey://) the cache. TASKS_URL (db://, redis://,
    immediate://) sets Huey and Django's TASKS, and a db:// queue keeps
    its huey_* tables in the database. EMAIL_URL (console://, smtp://,
    smtp+tls://, smtps://) sets mail, and MEDIA_URL, MEDIA_ROOT and the
    S3_* variables set storage, with WhiteNoise for static files. HTTPS
    settings follow SITE_URL and NUM_PROXIES, and the media library, image
    sizes and ADMIN_URL get defaults. Settings assigned after the call
    override it, and CONTENT_STUDIO, REST_FRAMEWORK and HEADLESS
    assigned before it are merged over the defaults one level deep. Your own
    sections read more variables (sections=[...]). Installing the
    content_studio.contrib.settings app creates the db:// cache and queue
    tables on migrate and adds the deploy checks content_studio.E065
    (DEBUG on), W040 (a placeholder or weak secret key, in place of
    Django's security.W009), W041 (a per-process cache) and W042
    (https without NUM_PROXIES). New extras: [server] (psycopg with its
    pool, the Redis client and WhiteNoise) and [s3] (django-storages).
  • Logging from the environment. configure() sets LOGGING with
    logging_settings() from LOG_FORMAT (json, or plain with
    DJANGO_DEBUG on), LOG_LEVEL (INFO) and LOG_ACCESS (the access log,
    on while DEBUG is off); an unknown format or level stops startup with
    an error that names the variable. Add RequestIdMiddleware first in
    MIDDLEWARE yourself.
  • Quiet heartbeat. logging_settings() leaves out Huey's INFO lines
    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 a LOGGING of your own.

v1.24.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 14:33

Features

  • Health checks. Include content_studio.health.urls at the root of
    your site for the endpoints a container orchestrator calls: /healthz
    answers when the process is up, /readyz checks the database
    (SELECT 1) and the cache (a set and a get), and /statusz adds the
    worker. Each check answers ok, error or off, only error makes the
    answer 503, and the answers need no login and carry no details.
    content_studio.health.middleware.HealthCheckMiddleware, placed above
    SecurityMiddleware, answers /healthz and /readyz before 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
    off when tasks run in the request or the cache is per process, and an
    error when its heartbeat is older than HEALTH_WORKER_STALE_AFTER
    (180 seconds). manage.py content_studio_worker_alive exits with 1
    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.
    TaskAdapter has three new optional methods,
    register_periodic_task(), on_worker_startup() and
    runs_in_request(), which HueyAdapter implements. manage.py check
    warns with content_studio.W036 when the middleware comes after
    SecurityMiddleware or CommonMiddleware, and with
    content_studio.W037 when 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; set ERROR_REPORTS to "email" and every new
    line logged at ERROR or above (a 500, a failed task, your own
    logger.error()) is mailed to ERROR_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_RELEASE and
    SENTRY_TRACES_SAMPLE_RATE, tagged with the request ID and without
    personal data; install django-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 check reports
    a setting that cannot work as content_studio.E064, warns with
    content_studio.W038 when Django's mail_admins would mail every error
    too, and with content_studio.W039 for Sentry mode without a DSN.
  • Logging. content_studio.logs adds RequestIdMiddleware, which
    gives each request an ID (a plain forwarded X-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 on content_studio.access (successful health
    checks left out). logging_settings("json") builds a LOGGING setting
    with JSON or plain lines and the request ID; JsonFormatter,
    PlainFormatter, RequestIdFilter and get_request_id() work in your
    own.

v1.23.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 12:36

Features

  • Email activity. The new content_studio.contrib.email_activity app
    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. Set EMAIL_BACKEND to
    content_studio.contrib.email_activity.backends.EmailBackend (or use it
    as a MAILERS backend 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 with email_kind() or the
    X-Content-Studio-Kind header. Emails are kept for
    EMAIL_ACTIVITY_KEEP_DAYS (30) and pruned after sending or with
    content_studio_prune_emails; EMAIL_ACTIVITY_MASK stores addresses as
    s***@example.com without subjects. has_email_activity_permission()
    on the admin site decides who sees the page. manage.py check reports
    a bad setup as content_studio.E062, and warns with
    content_studio.W035 when 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
    Authorization header 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 the Authorization header 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_INTERVAL setting sets the window (0 or None
    for none); manage.py check reports 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

Choose a tag to compare

@github-actions github-actions released this 26 Nov 13:51

Fixes

  • Filters on text fields without choices. A CharField or TextField
    without choices in list_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 check warns about it as content_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

Choose a tag to compare

@github-actions github-actions released this 25 Nov 12:59

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.