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
djpressby adding it to your requirements file, e.g.djpress~=0.31.0(see versioning note, above). - Add it to your
INSTALLED_APPSin Django:
INSTALLED_APPS = [
# ...
"djpress.apps.DjpressConfig",
# ...
]
- Add the URLs to your project's main
urls.pyfile.
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
staffstatus 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
Metadata
Release files for djpress 0.32.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| djpress-0.32.0.tar.gz | 132.0 kB | Without provenance | Details for djpress-0.32.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djpress-0.32.0-py3-none-any.whl | Python 3 | none | any | Details for djpress-0.32.0-py3-none-any.whl |
Total release size: 227.7 kB
Release files / djpress-0.32.0.tar.gz
| Download URL | djpress-0.32.0.tar.gz |
|---|---|
| Size | 132.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1149c6d3878d42532700952d3665ce4762f8e5e75b644cc169000ae1de6d3aaa
|
|
BLAKE2b-256 checksum How to use checksums |
b490e0351ae5183082808007054f06574f6976e8ff419f0063f81baf4d323ae6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure
|
Release files / djpress-0.32.0-py3-none-any.whl
| Download URL | djpress-0.32.0-py3-none-any.whl |
|---|---|
| Size | 95.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfcc99fa119dc34667f0aa5cfd73dd12aaecf8a28718e3e3e455b5da91c35ed6
|
|
BLAKE2b-256 checksum How to use checksums |
26339c04611ee2a115a7ca4709919e54f9d669c231552e35f86bc1485a35f322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure
|
Security for djpress 0.32.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.