Name | django-plugin-blog JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | A simple blog implemented as a DJP plugin |
upload_time | 2024-09-24 14:39:33 |
maintainer | None |
docs_url | None |
author | Simon Willison |
requires_python | None |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# django-plugin-blog
[![PyPI](https://img.shields.io/pypi/v/django-plugin-blog.svg)](https://pypi.org/project/django-plugin-blog/)
[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-blog?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-blog/releases)
[![Tests](https://github.com/simonw/django-plugin-blog/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-blog/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-blog/blob/main/LICENSE)
A simple blog implemented as a [DJP plugin](https://djp.readthedocs.io/).
## Installation
Install this plugin in the same environment as your Django application.
```bash
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:
```bash
cd django-plugin-blog
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
python -m pytest
```
Raw data
{
"_id": null,
"home_page": null,
"name": "django-plugin-blog",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Simon Willison",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/96/a1/8a5809ecb4e7b006d4be3e9499013fa20a716b4ee3bd8e8caa54a2428d43/django_plugin_blog-0.1.1.tar.gz",
"platform": null,
"description": "# django-plugin-blog\n\n[![PyPI](https://img.shields.io/pypi/v/django-plugin-blog.svg)](https://pypi.org/project/django-plugin-blog/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-blog?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-blog/releases)\n[![Tests](https://github.com/simonw/django-plugin-blog/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-blog/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-blog/blob/main/LICENSE)\n\nA simple blog implemented as a [DJP plugin](https://djp.readthedocs.io/).\n\n## Installation\n\nInstall this plugin in the same environment as your Django application.\n```bash\npip install django-plugin-blog\n```\n## Usage\n\nThis adds a blog at `/blog/`, configured to be edited using the Django admin.\n\n## Custom templates\n\nThe default templates expect a base template with `{% block title %}` and `{% block content %}` and `{% block extra_head %}` blocks.\n\nYou can use the `DJANGO_PLUGIN_BLOG_BASE_TEMPLATE` setting to point to an existing base template.\n\nYou can also provide your own versions of the following template files in your own templates directory:\n\n- `django_plugin_blog/base.html` - the base template for the blog\n- `django_plugin_blog/index.html` - the index page, at `/blog/`\n- `django_plugin_blog/archive.html` - the archive page, at `/blog/archive/`\n- `django_plugin_blog/year.html` - the archive for a year, at `/blog/YYYY/`\n- `django_plugin_blog/tag.html` - the archive for a tag, at `/blog/tag/TAG/`\n- `django_plugin_blog/entry.html` - the detail page for an entry, at `/blog/YYYY/slug/`\n\n## Atom feed\n\nA feed is provided at `/blog/feed/`. You can customize the title of this feed using the `DJANGO_PLUGIN_BLOG_FEED_TITLE` setting.\n\n## Custom URL\n\nThe plugin adds URLs under `/blog/` by default. You can change this using the `DJANGO_PLUGIN_BLOG_URL_PREFIX` setting.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd django-plugin-blog\npython -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npython -m pytest\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A simple blog implemented as a DJP plugin",
"version": "0.1.1",
"project_urls": {
"CI": "https://github.com/simonw/django-plugin-blog/actions",
"Changelog": "https://github.com/simonw/django-plugin-blog/releases",
"Homepage": "https://github.com/simonw/django-plugin-blog",
"Issues": "https://github.com/simonw/django-plugin-blog/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4e681d023645ae7b1eeb69af46f1df2bb46d6c255cc2749ce79f473e287baa58",
"md5": "2fb0034a526f15981a7ee8fb1724a6a9",
"sha256": "f6fd3b65998aac38daae4dac25950fe1118c31750f29c409435978c95b1db59f"
},
"downloads": -1,
"filename": "django_plugin_blog-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2fb0034a526f15981a7ee8fb1724a6a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14553,
"upload_time": "2024-09-24T14:39:32",
"upload_time_iso_8601": "2024-09-24T14:39:32.598899Z",
"url": "https://files.pythonhosted.org/packages/4e/68/1d023645ae7b1eeb69af46f1df2bb46d6c255cc2749ce79f473e287baa58/django_plugin_blog-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "96a18a5809ecb4e7b006d4be3e9499013fa20a716b4ee3bd8e8caa54a2428d43",
"md5": "05bc223dc53565e0e797959813059f76",
"sha256": "b4e846fe1ccd6b6e535d7c895b2ce0700e0e9d7c58e6e377f1d8232662b9eb91"
},
"downloads": -1,
"filename": "django_plugin_blog-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "05bc223dc53565e0e797959813059f76",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12980,
"upload_time": "2024-09-24T14:39:33",
"upload_time_iso_8601": "2024-09-24T14:39:33.849415Z",
"url": "https://files.pythonhosted.org/packages/96/a1/8a5809ecb4e7b006d4be3e9499013fa20a716b4ee3bd8e8caa54a2428d43/django_plugin_blog-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-24 14:39:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simonw",
"github_project": "django-plugin-blog",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-plugin-blog"
}