Skip to main content

DJ Press

A blog application for Django sites, inspired by classic WordPress, available on PyPI.

Warning - very alpha.

Goals

Why build another blog engine? These are my goals...

  • Simple to get started with sensible defaults: install plugin, configure urls.py, and migrate.
  • Follows Django patterns: configuration in settings.py, content management in the Django admin.
  • Configurable to suit a wide variety of use-cases: lots of configuration available, but not required.
  • Customisable with themes: themes can be written using only template tags, no knowledge of models required.
  • Customisable with plugins: simple plugins are easy to write, but complex plugins are possible.
  • Powerful but lightweight: provide core functionality, allow plugins to fill gaps and enhance.

Versioning

This package uses semantic versioning, but until we reach version 1.x.x, the following rules will apply:

  • MAJOR version will remain on 0 until the base functionality is complete.
  • MINOR version indicates that an incompatible or breaking change has been introduced.
  • PATCH version indicates a bug fix or a backward compatible change.

If you choose to use this package prior to version 1.x being released, please pin your requirements to a specific minor version, e.g. djpress~=0.31.0

Installation

  • Install djpress by adding it to your requirements file, e.g. djpress~=0.31.0 (see versioning note, above).
  • Add it to your INSTALLED_APPS in Django:
INSTALLED_APPS = [
    # ...
    "djpress.apps.DjpressConfig",
    # ...
]
  • Add the URLs to your project's main urls.py file.

The following will set DJ Press to be available at the root of your site, e.g. https://example.com/

from django.urls import path, include

urlpatterns = [
    # ...
    path("", include("djpress.urls")),
    # ...
]

If you want your blog to be in a subdirectory, use something like the following:

from django.urls import path, include

urlpatterns = [
    # ...
    path("blog/", include("djpress.urls")),
    # ...
]
  • Run migrations: python3 manage.py migrate

Note that this relies on the Django Admin for content management, so ensure that you have a user with at least staff status to manage content.

Configuration

In your settings.py file, create a DJPRESS_SETTINGS dictionary. Here are some common settings:

# DJPress settings
DJPRESS_SETTINGS = {
    "SITE_TITLE": "My Awesome Blog",
    "POST_PREFIX": "{{ year }}/{{ month }}",  # blog post URLs are prefixed with "year/month": /2024/10/blog-post-slug/
}

There are lots more settings available. Please check the docs or look at the source code: src/djpress/app_settings.py

Development

Development requires PDM 2.28 or newer because the example plugin is a PDM workspace member. From the repository root:

pdm install -G :all
pdm run python example/manage.py runserver

The root library and djpress-example-plugin are installed editable into the shared environment. The Django project in example/ is an unpackaged consumer of both, so it is run directly rather than installed as another workspace package.

Use pdm run pytest for the current environment, or pdm run nox --session test for the complete supported Python/Django matrix. The justfile provides shortcuts for the common development, test, documentation, build, and release commands.

Documentation

Documentation is a work-in-progress, but is available on GitHub Pages: https://stuartmaxwell.github.io/djpress

Badges

codecov

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djpress-0.31.0.tar.gz (130.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djpress-0.31.0-py3-none-any.whl (94.8 kB view details)

Uploaded Python 3

File details

Details for the file djpress-0.31.0.tar.gz.

File metadata

  • Download URL: djpress-0.31.0.tar.gz
  • Upload date:
  • Size: 130.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.29.0 CPython/3.14.7 Linux/6.17.0-1022-azure

File hashes

Hashes for djpress-0.31.0.tar.gz
Algorithm Hash digest
SHA256 c7ac4c468d92d095b34c6d3a91aacc3138f8b24af0a0b02051be08e476043e9d
MD5 48a62d8fbb3b44fbb361ef9dd1b90027
BLAKE2b-256 b9ffab93a2cf9e10fac8d8131a31bdff33ba7360e328abd40e57e0ababd876ee

See more details on using hashes here.

File details

Details for the file djpress-0.31.0-py3-none-any.whl.

File metadata

  • Download URL: djpress-0.31.0-py3-none-any.whl
  • Upload date:
  • Size: 94.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.29.0 CPython/3.14.7 Linux/6.17.0-1022-azure

File hashes

Hashes for djpress-0.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3543e4a06dd86170b222f2dbe9eda390b34f0472dd39b80d377391792eb8fa3d
MD5 330fac951c7568082e7d80fa29deb113
BLAKE2b-256 e1865f8f44b73756af0fe650b97706345e6d351e5ec405235ee40d09252d3085

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.31.0 This release

2 files

0.30.1

2 files

0.30.0

2 files

0.29.9

2 files

0.29.8

2 files

0.29.7

2 files

0.29.6

2 files

0.29.5

2 files

0.29.4

2 files

0.29.3

2 files

0.29.2

2 files

0.29.1

2 files

0.29.0

2 files

0.28.1

2 files

0.28.0

2 files

0.27.3

2 files

0.27.2

2 files

0.27.1

2 files

0.27.0

2 files

0.26.0

2 files

0.25.2

2 files

0.25.1

2 files

0.25.0

2 files

0.24.1

2 files

0.24.0

2 files

0.23.0

2 files

0.22.3

2 files

0.22.2

2 files

0.22.1

2 files

0.22.0

2 files

0.21.0

2 files

0.20.4

2 files

0.20.3

2 files

0.20.2

2 files

0.20.1

2 files

0.19.4

2 files

0.19.3

2 files

0.19.2

2 files

0.19.0

2 files

0.18.1

2 files

0.18.0

2 files

0.17.1

2 files

0.16.2

2 files

0.16.1

2 files

0.16.0

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.3

2 files

0.13.2

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.4

2 files

0.11.3

2 files

0.11.2

2 files

0.11.0

2 files

0.10.0

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.4.0

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.2

2 files

0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page