Skip to content

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 07:28
· 46 commits to main since this release
  • Postgres 18. init --postgres latest now generates Postgres 18,
    with its volume at /var/lib/postgresql, where the image keeps a
    directory per version. The backend image installs the Postgres client
    from the PostgreSQL apt repository at the bundled server's major version
    (ARG POSTGRES_VERSION in backend/Dockerfile), so backups work with
    either. config refuses another Postgres version; the backups docs
    show how to upgrade with a backup and a restore.

  • Headless projects. init --frontend headless (and --preset api)
    now generates a project with the content API and the admin only: no
    frontend/ and no frontend service. Django serves the whole domain, in
    development on SITE_PORT, with a start page at / that links to the
    admin and the API schema (django_stack.start). Page analytics is
    off, REVALIDATE_URL is empty until you set your frontend's, and
    dstack types writes only backend/openapi.json. dstack check,
    doctor, dev and update skip the frontend when there is none. The
    templates' text files can now hold # @if frontend / # @end blocks.

  • Fixed: with page analytics off, the backend did not start with Django
    Content Studio 1.12, whose check content_studio.E037 refuses the
    Analytics components of the page and post studios without an
    AnalyticsExtension. content/admin.py now adds them only when Umami is
    configured. In an existing project with analytics off, make the same
    change.

  • A local Postgres with an external database. init --database-url
    now saves the URL as PRODUCTION_DATABASE_URL and keeps the bundled
    Postgres for development, so local work never writes to the server's
    database. dstack production makes it DATABASE_URL in
    .env.production and leaves out db; dstack run keeps the bundled
    one. init also asks for the external server's Postgres version, for the
    local Postgres and the backups' client. Existing projects with
    DATABASE_URL set to an external Postgres keep working as before.

  • django_stack.contrib.site, for a site Django renders with
    templates (the coming --frontend templates): the /preview and
    /preview/exit routes with a preview cookie, published(queryset, request) with the same rules as the content API, the @site_page
    decorator (a page cache in Django's cache, emptied when content in the
    CONTENT_APPS or the media library changes, and the site's
    Content-Security-Policy), RedirectMiddleware for editor-managed
    redirects, a context processor, and the {% blocks %}, {% image %},
    {% seo %}, link_href and is_current template tags. /_a/script.js
    and /_a/api/send pass Umami's tracker and page views through where no
    reverse proxy does, as in development.
    django_stack.contrib.captcha.forms.CaptchaField adds the captcha to a
    Django form, with the @cap.js/widget 0.1.58 script vendored as a
    static file.

  • Django templates. init --frontend templates now generates a
    project where Django renders the site: a website app in
    backend/website/ with the pages, the blog, categories, tags, the RSS
    feed, the sitemap, robots.txt and the contact form of the Astro
    starter, with its stylesheet, and tests of every page. There is no
    frontend service and no Node; the pages read the content with the ORM
    and django_stack.contrib.site. Caddy sends every request but /media
    and /_a/ to the backend. The templates in templates/ can now also
    hold @if headless, @if templates and @if site blocks.