Skip to main content

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

Project description

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 release, please pin your requirements to a specific minor version, e.g. djpress~=0.16.0

Installation

  • Install djpress by adding it to your requirements file, e.g. djpress~=0.16.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

Documentation

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

Badges

codecov

Project details


Release history Release notifications | RSS feed

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.29.5.tar.gz (241.1 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.29.5-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: djpress-0.29.5.tar.gz
  • Upload date:
  • Size: 241.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for djpress-0.29.5.tar.gz
Algorithm Hash digest
SHA256 d2c8e2ac20fb442acf4b5a1074db92d48793060d291a0e6c6af9864f9f2601c8
MD5 ee038fef548e87f8e8213c79294276b8
BLAKE2b-256 165904e30ad25b7b518e78a7d52d8e166c4beef17fac8d7c03f089104b9f7c9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for djpress-0.29.5.tar.gz:

Publisher: publish.yml on stuartmaxwell/djpress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: djpress-0.29.5-py3-none-any.whl
  • Upload date:
  • Size: 93.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for djpress-0.29.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b94f5aeb5751b86532a198e17e657c033763869cbc13bc3e6728fca3faf0baff
MD5 21ae2741e4d2752b4c6d1a790e141824
BLAKE2b-256 12c392001d308304d2d9518d0307acd7e48a1a49029004d1f38b173918e7286e

See more details on using hashes here.

Provenance

The following attestation bundles were made for djpress-0.29.5-py3-none-any.whl:

Publisher: publish.yml on stuartmaxwell/djpress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page