跳转到主要内容

为Django应用添加Django-Compositions HTTP头

项目描述

django-plugin-django-header

PyPI Changelog Tests License

为Django应用添加Django-Compositions HTTP头

安装

首先 安装和配置DJP

然后在与您的Django应用程序相同的环境中安装此插件。

pip install django-plugin-django-header

使用

安装后,应用程序的每个响应都将包含一个 Django-Composition HTTP头,列出 Django Reinhardt的一首曲子。例如

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
...

开发

要本地设置此插件,首先检出代码。然后创建一个新的虚拟环境

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

现在安装依赖项和测试依赖项

pip install -e '.[test]'

要运行测试

python -m pytest

项目详情


下载文件

下载适合您平台文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

django_plugin_django_header-0.1.1.tar.gz (7.8 kB 查看哈希值)

上传时间 源代码

构建分发版

django_plugin_django_header-0.1.1-py3-none-any.whl (8.4 kB 查看哈希值)

上传时间 Python 3

由以下支持