Name | django-plugin-django-header JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Add a Django-Compositions HTTP header to a Django app |
upload_time | 2024-09-23 19:43:42 |
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-django-header
[![PyPI](https://img.shields.io/pypi/v/django-plugin-django-header.svg)](https://pypi.org/project/django-plugin-django-header/)
[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-django-header?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-django-header/releases)
[![Tests](https://github.com/simonw/django-plugin-django-header/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-django-header/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-django-header/blob/main/LICENSE)
Add a Django-Compositions HTTP header to a Django app
## Installation
First [install and configure DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html).
Then install this plugin in the same environment as your Django application.
```bash
pip install django-plugin-django-header
```
## Usage
Once installed, every response from the application will include a `Django-Composition` HTTP header listing [a composition by Django Reinhardt](https://en.wikipedia.org/wiki/List_of_compositions_by_Django_Reinhardt). For example:
```bash
curl -I http://localhost:8000/
```
```
HTTP/1.1 200 OK
Server: WSGIServer/0.2 CPython/3.12.0
Content-Type: text/html; charset=utf-8
Django-Composition: Castle of My Dreams
...
```
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd django-plugin-django-header
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-django-header",
"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/99/43/aa397fa4f3e020984e01da9482f8ae34a042b0cf8b4d42909a1d4df18c8e/django_plugin_django_header-0.1.1.tar.gz",
"platform": null,
"description": "# django-plugin-django-header\n\n[![PyPI](https://img.shields.io/pypi/v/django-plugin-django-header.svg)](https://pypi.org/project/django-plugin-django-header/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/django-plugin-django-header?include_prereleases&label=changelog)](https://github.com/simonw/django-plugin-django-header/releases)\n[![Tests](https://github.com/simonw/django-plugin-django-header/workflows/Test/badge.svg)](https://github.com/simonw/django-plugin-django-header/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/django-plugin-django-header/blob/main/LICENSE)\n\nAdd a Django-Compositions HTTP header to a Django app\n\n## Installation\n\nFirst [install and configure DJP](https://djp.readthedocs.io/en/latest/installing_plugins.html).\n\nThen install this plugin in the same environment as your Django application.\n```bash\npip install django-plugin-django-header\n```\n## Usage\n\nOnce installed, every response from the application will include a `Django-Composition` HTTP header listing [a composition by Django Reinhardt](https://en.wikipedia.org/wiki/List_of_compositions_by_Django_Reinhardt). For example:\n\n```bash\ncurl -I http://localhost:8000/\n```\n```\nHTTP/1.1 200 OK\nServer: WSGIServer/0.2 CPython/3.12.0\nContent-Type: text/html; charset=utf-8\nDjango-Composition: Castle of My Dreams\n...\n```\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-django-header\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": "Add a Django-Compositions HTTP header to a Django app",
"version": "0.1.1",
"project_urls": {
"CI": "https://github.com/simonw/django-plugin-django-header/actions",
"Changelog": "https://github.com/simonw/django-plugin-django-header/releases",
"Homepage": "https://github.com/simonw/django-plugin-django-header",
"Issues": "https://github.com/simonw/django-plugin-django-header/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c58b26f49057fb5e285ebf0a2f5c631f6297f499e24a83a2a933f8df98defb9",
"md5": "120fc8f47c4220fce92f0c7215934936",
"sha256": "df969f286ec5d0666a9078aaf8ee9cf1d928492d38258a46eecad72bba1efaf0"
},
"downloads": -1,
"filename": "django_plugin_django_header-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "120fc8f47c4220fce92f0c7215934936",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8374,
"upload_time": "2024-09-23T19:43:41",
"upload_time_iso_8601": "2024-09-23T19:43:41.727885Z",
"url": "https://files.pythonhosted.org/packages/6c/58/b26f49057fb5e285ebf0a2f5c631f6297f499e24a83a2a933f8df98defb9/django_plugin_django_header-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9943aa397fa4f3e020984e01da9482f8ae34a042b0cf8b4d42909a1d4df18c8e",
"md5": "7fd8c035319a0f4276855b9af36c65a5",
"sha256": "7f598ff034543dbdbb3626ba91290ff683ebbe9686d99bfb41d1aa7dc843ad64"
},
"downloads": -1,
"filename": "django_plugin_django_header-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "7fd8c035319a0f4276855b9af36c65a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7759,
"upload_time": "2024-09-23T19:43:42",
"upload_time_iso_8601": "2024-09-23T19:43:42.780132Z",
"url": "https://files.pythonhosted.org/packages/99/43/aa397fa4f3e020984e01da9482f8ae34a042b0cf8b4d42909a1d4df18c8e/django_plugin_django_header-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-23 19:43:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simonw",
"github_project": "django-plugin-django-header",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-plugin-django-header"
}