django-blog-core
Reusable multi-blog Django app: Blog, optional Section, and Article
with draft / scheduled / published / archived workflow, RSS + Atom feeds,
a Pinax-style hookset, secret preview URLs, and optional Markdown / HTML
sanitize extras.
Status: 0.1.x on PyPI. Extras
[search],[tags],[social],[images]are documented stubs;[events]ships a working, opt-inArticleEventtimeline model.
Install
pip install django-blog-core
pip install "django-blog-core[markdown]" # Markdown bodies
pip install "django-blog-core[sanitize]" # bleach HTML policy
pip install "django-blog-core[all]" # markdown + sanitize
Quickstart
# settings.py
INSTALLED_APPS = [
# ...
"blog_core",
]
BLOG_CORE = {
"PAGINATE_BY": 12,
"SANITIZE_HTML": True,
# "HOOKSET": "myapp.hooks.BlogHookSet",
}
# Or: BLOG_CORE_HOOKSET = "myapp.hooks.BlogHookSet"
# urls.py
from django.urls import include, path
urlpatterns = [
path("blog/", include("blog_core.urls")),
]
python manage.py migrate
python manage.py publish_scheduled_articles # cron / host scheduler
Create a Blog and Article in admin. Public list/detail live at
/blog/<blog-slug>/ and /blog/<blog-slug>/<article-slug>/. Feeds:
/blog/<blog-slug>/feed/rss//blog/<blog-slug>/feed/atom/
Preview drafts with the secret URL from the admin “Preview” column.
Public visibility
Article.objects.published() (alias public()) is the single source of truth:
state == "published" and publish_at <= now.
Hookset
Subclass blog_core.hookset.DefaultBlogHookSet to customize absolute URLs,
who may view non-public articles, body rendering, and feed titles — without
forking the package. Hooksets must not widen the public queryset.
HTML / Markdown safety
- Markdown → HTML via the
[markdown]extra. - HTML (and Markdown output) is sanitized with bleach when
[sanitize]is installed andBLOG_CORE["SANITIZE_HTML"]is true (default). - Without bleach, HTML is escaped rather than passed through.
- Set
ALLOW_RAW_HTML = Trueonly if you accept XSS risk. Seedocs/sanitize.md.
Extras
| Extra | Purpose |
|---|---|
[markdown] |
Markdown body rendering |
[sanitize] |
bleach allow-list |
[search] |
stub — Haystack/published() index patterns |
[tags] |
stub — tagging integration |
[social] |
stub — share matrix |
[images] |
stub — media attachments |
[events] |
domain-neutral ArticleEvent timeline; opt in via INSTALLED_APPS — see docs/extras.md |
Development
pip install -e ".[testing]"
pytest
# or: tox -e py313-django52
License
MIT — see LICENSE.
Metadata
Release files for django-blog-core 0.1.7
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 |
|---|---|---|---|---|
| django_blog_core-0.1.7.tar.gz | 31.1 kB | Without provenance | Details for django_blog_core-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_blog_core-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for django_blog_core-0.1.7-py3-none-any.whl |
Total release size: 63.8 kB
Release files / django_blog_core-0.1.7.tar.gz
| Download URL | django_blog_core-0.1.7.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12af279efe3709cf9729bfa402cd59ec1e17c3f0919062b0cc97baaa5e239b31
|
|
BLAKE2b-256 checksum How to use checksums |
d751ce29e78752f18c552fad15843faadf42b79742c68d281371b03f03d61bda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / django_blog_core-0.1.7-py3-none-any.whl
| Download URL | django_blog_core-0.1.7-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58352a0e1eb58075e4d9dc75969161b1a5a08b5724065acd58ceacb2e79fd3cd
|
|
BLAKE2b-256 checksum How to use checksums |
eab9aeb68e2b5f9f13fb06f8fc798fe2c86d2933b8d07d1c840fb73b2cb0c50e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for django-blog-core 0.1.7
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.