Extra decorators for your Django project.
Project description
Description
This package provides decorators to make building websites in Django even easier.
Installation
$ pip install django-decorator-plus
Basic Usage
The package currently supplies decorators to improve your views.
The require_http_methods() decorator is an enhanced version of the decorator supplied by Django.
@require_http_methods(["GET", "POST"])
def function_view(request):
# HTTP methods != GET or POST results in 405 error code response
The require_http_methods() automatically supplies the OPTIONS HTTP method, and will automatically add the HEAD HTTP method if the GET method is allowed.
The package also supplies two shortcut decorators for your most common tasks:
require_safe_methods limits views to GET and HEAD.
require_form_methods limites views to GET, HEAD, and POST.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Close
Hashes for django-decorator-plus-0.0.1a1.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b55c85ac0fce8a35fdcb07dde3e20189b234e207bd4b14d76d4b4a328b0d51 |
|
MD5 | bfeb26ccba7c411f48a9a9c926540610 |
|
BLAKE2b-256 | d061712de1f30b9cd08967c55d702255ece1355d792e6a96d73104ffe11679f8 |
Close
Hashes for django-decorator-plus-0.0.1a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4296eabb9937cc40790f62d5afddb9bef088a6314491e390c59db43b11a6d18 |
|
MD5 | c23ccc9fe92375e0395d0dbceb213017 |
|
BLAKE2b-256 | a41a6d344d0a6bdbc4df7e269f697f4bdb7b39cc2c6ad4f40cd0a51cb8d60ca6 |
Close
Hashes for django_decorator_plus-0.0.1a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbed9feebbfd62da06f9dbb9c144764a60cecd19c5410c42f021fbbdeca5c127 |
|
MD5 | d0ac42a8656f3a24d164eb317c96be82 |
|
BLAKE2b-256 | 2126a5a7295193255bd75d47cb09c257853bff00934b17d879e01d035d343c0c |