Skip to main content
django-decorators
=================
why?
----
**django-decorators** were created during many projects where I found myself rewriting over and over the same code.

Installation:
--

Simply use pip:

pip install django-decorators


List of decorators:
--

#### @add_http_var
An example usage

from django_decorators.decorators import add_http_var

@add_http_var('page')
def any_view(request, page):
return HttpResponse(page)

#### @json_response

An example usage

from django_decorators.decorators import json_response

@json_response
def any_view(request):
return {'this will be': 'JSON'}

returns a JSON string.

Now, if you need a JSONP response, just add a callback GET or POST variable :)

#### @requires_post

An example usage

from django_decorators.decorators import requires_post

@requires_post
def any_view(request):
return return HttpResponse('only works with POST')




Copyright and Licensing
-----------------------

Copyright 2012 Julián Amaya M. [@julian_amaya](http://twitter.com/julian_amaya) <br />
Licensed under the Apache License, Version 2.0<br />
<http://www.apache.org/licenses/LICENSE-2.0>

Metadata

Release files for django-decorators 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-decorators 0.1.1
File Size Uploaded Provenance
django-decorators-0.1.1.tar.gz 2.3 kB Without provenance Details

Release files / django-decorators-0.1.1.tar.gz

Download URL django-decorators-0.1.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e029c03241662efd60bf50597f224b8debdff4c9cefd4d760664d2248a09a654
BLAKE2b-256 checksum
How to use checksums
09feee1c7fa2aaa1d78603b16d47a9fa26476b9ae89b4b213737db54522372c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-decorators 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page