Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronbassett/django-GNU-Terry-Pratchett
You know they'll never really die while the Trunk is alive
https://github.com/aaronbassett/django-GNU-Terry-Pratchett
Last synced: 3 months ago
JSON representation
You know they'll never really die while the Trunk is alive
- Host: GitHub
- URL: https://github.com/aaronbassett/django-GNU-Terry-Pratchett
- Owner: aaronbassett
- License: bsd-3-clause
- Archived: true
- Created: 2015-03-18T18:18:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:15:23.000Z (almost 2 years ago)
- Last Synced: 2024-06-25T11:42:05.115Z (5 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 27
- Watchers: 4
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Django GNU Terry Pratchett
==========================Keeping the legacy of [Sir Terry Pratchett](http://en.wikipedia.org/wiki/Terry_Pratchett) alive forever.
For as long as his name is still passed along the Clacks,
Death can't have him.* G: send the message on
* N: do not log the message
* U: turn the message around at the end of the line and send it back againwith thanks to [this reddit thread](http://www.reddit.com/r/discworld/comments/2yt9j6/gnu_terry_pratchett/)
Installation
------------You can install from pypi:
pip install django-GNU-Terry-Pratchett
or from source:
git clone [email protected]:aaronbassett/django-GNU-Terry-Pratchett.git
cd django-GNU-Terry-Pratchett
python setup.py installOnce installed add the middleware to you project:
MIDDLEWARE_CLASSES=(
...
'gnu_terry_pratchett.middleware.ClacksMiddleware',
),We also provide a view decorator and a mixin for your Class-Based Views if you
don't want to have the header on every response.from gnu_terry_pratchett.decorators import clacks_overhead
from gnu_terry_pratchett.views import ClacksMixin# function view
@clacks_overhead
def my_view(request):
...
return my_response# CBV
class MyView(ClacksMixin, View):
def get(self, request):
...
return my_response