Skip to main content

A simple blog implemented as a DJP plugin

Project description

django-plugin-blog

PyPI Changelog Tests License

A simple blog implemented as a DJP plugin.

Installation

Install this plugin in the same environment as your Django application.

pip install django-plugin-blog

Usage

This adds a blog at /blog/, configured to be edited using the Django admin.

Custom templates

The default templates expect a base template with {% block title %} and {% block content %} and {% block extra_head %} blocks.

You can use the DJANGO_PLUGIN_BLOG_BASE_TEMPLATE setting to point to an existing base template.

You can also provide your own versions of the following template files in your own templates directory:

  • django_plugin_blog/base.html - the base template for the blog
  • django_plugin_blog/index.html - the index page, at /blog/
  • django_plugin_blog/archive.html - the archive page, at /blog/archive/
  • django_plugin_blog/year.html - the archive for a year, at /blog/YYYY/
  • django_plugin_blog/tag.html - the archive for a tag, at /blog/tag/TAG/
  • django_plugin_blog/entry.html - the detail page for an entry, at /blog/YYYY/slug/

Atom feed

A feed is provided at /blog/feed/. You can customize the title of this feed using the DJANGO_PLUGIN_BLOG_FEED_TITLE setting.

Custom URL

The plugin adds URLs under /blog/ by default. You can change this using the DJANGO_PLUGIN_BLOG_URL_PREFIX setting.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd django-plugin-blog
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m pytest

Project details


Download files

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

Source Distribution

django_plugin_blog-0.1.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

django_plugin_blog-0.1.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file django_plugin_blog-0.1.1.tar.gz.

File metadata

  • Download URL: django_plugin_blog-0.1.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for django_plugin_blog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b4e846fe1ccd6b6e535d7c895b2ce0700e0e9d7c58e6e377f1d8232662b9eb91
MD5 05bc223dc53565e0e797959813059f76
BLAKE2b-256 96a18a5809ecb4e7b006d4be3e9499013fa20a716b4ee3bd8e8caa54a2428d43

See more details on using hashes here.

File details

Details for the file django_plugin_blog-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_plugin_blog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fd3b65998aac38daae4dac25950fe1118c31750f29c409435978c95b1db59f
MD5 2fb0034a526f15981a7ee8fb1724a6a9
BLAKE2b-256 4e681d023645ae7b1eeb69af46f1df2bb46d6c255cc2749ce79f473e287baa58

See more details on using hashes here.

Supported by

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