Add branding headers to you response
Project description
django-branding
---------------
Add branding headers to response.
Requirements
============
* Django
Installation
============
Install it with pip (or easy_install)::
pip install django-branding
Usage
=====
Add branding middleware from branding to you django config
MIDDLEWARE_CLASSES += 'branding.middleware.BrandingMiddleware',
Define headers variables in settings
BRANDING = {
'X-Programming': 'Lispython',
'X-Revision': '232134'
}
X_SERVER = "Super Server"
Example
=======
Example of headers on http://dzone.me
In [1]: import human_curl as hurl
In [2]: r = hurl.get('http://dzone.me')
In [3]: r.headers
Out[3]:
{'cache-control': 'max-age=600',
'connection': 'keep-alive',
'content-language': 'ru-ru',
'content-length': '55239',
'content-type': 'text/html; charset=utf-8',
'date': 'Sun, 29 Apr 2012 12:51:12 GMT',
'expires': 'Sun, 29 Apr 2012 13:01:12 GMT',
'last-modified': 'Sun, 29 Apr 2012 12:51:12 GMT',
'link': '<dzone.me>; rel="platform"',
'server': 'Super Server',
'vary': 'Accept-Language, Cookie, Accept-Encoding',
'x-powered-by': 'D Zone',
'x-programming': 'Alex Lispython (alex@dzone.me, github.com/lispython)',
'x-revision': '5215de3',
'x-version': '20120311.0013-0'}
---------------
Add branding headers to response.
Requirements
============
* Django
Installation
============
Install it with pip (or easy_install)::
pip install django-branding
Usage
=====
Add branding middleware from branding to you django config
MIDDLEWARE_CLASSES += 'branding.middleware.BrandingMiddleware',
Define headers variables in settings
BRANDING = {
'X-Programming': 'Lispython',
'X-Revision': '232134'
}
X_SERVER = "Super Server"
Example
=======
Example of headers on http://dzone.me
In [1]: import human_curl as hurl
In [2]: r = hurl.get('http://dzone.me')
In [3]: r.headers
Out[3]:
{'cache-control': 'max-age=600',
'connection': 'keep-alive',
'content-language': 'ru-ru',
'content-length': '55239',
'content-type': 'text/html; charset=utf-8',
'date': 'Sun, 29 Apr 2012 12:51:12 GMT',
'expires': 'Sun, 29 Apr 2012 13:01:12 GMT',
'last-modified': 'Sun, 29 Apr 2012 12:51:12 GMT',
'link': '<dzone.me>; rel="platform"',
'server': 'Super Server',
'vary': 'Accept-Language, Cookie, Accept-Encoding',
'x-powered-by': 'D Zone',
'x-programming': 'Alex Lispython (alex@dzone.me, github.com/lispython)',
'x-revision': '5215de3',
'x-version': '20120311.0013-0'}
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_branding-0.0.6.tar.gz
(3.5 kB
view details)
File details
Details for the file django_branding-0.0.6.tar.gz
.
File metadata
- Download URL: django_branding-0.0.6.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95ee0829c1b09d2a1aa9e9ef99c9c3689697840cdddb7e479e62fb0d8cc49232 |
|
MD5 | 4ff9864b9070d419c24790d65b8553ae |
|
BLAKE2b-256 | e0a1234891d4570f5d0cb0508c6ccbeeb5b853013a5b198834070e95540991be |