django-cross-origin
django-cross-origin is a Django app enabling cross-origin resource sharing in views.
Features
Enable CORS on Django class-based generic views with a simple mixin.
Full customization of all CORS headers via accessor override.
Installation
Checkout the latest django-cross-origin release and copy or symlink the cross_origin directory into your PYTHONPATH. If using pip, run pip install django-cross-origin.
Add 'cross_origin' to your INSTALLED_APPS setting.
Usage
To enable CORS on a Django class-based view, simply mixin the cross_origin.views.AccessControlMixin to your view:
from django.views import generic
from cross_origin.views import AccessControlMixin
class YourView(AccessControlMixin, generic.TemplateView):
"""Your view code here!"""
All CORS response headers can be customized by overriding accessor methods on your view. For a complete list of available accessors, see the source code for AccessControlMixin.
More information
The django-cross-origin project was developed at Mohawk, and is released as Open Source under the MIT license.
You can get the code from the django-cross-origin project site.
Contributors
The following people were involved in the development of this project.
Dave Hall - Blog | GitHub | Twitter | Google Profile
Metadata
Release files for django-cross-origin 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-cross-origin-0.9.0.tar.gz | 4.0 kB | Without provenance | Details for django-cross-origin-0.9.0.tar.gz |
Release files / django-cross-origin-0.9.0.tar.gz
| Download URL | django-cross-origin-0.9.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a4beb3b514da787bc424937bc18918f7e2fe8c80b26c4da194d809bb4f06fcc
|
|
BLAKE2b-256 checksum How to use checksums |
f37ffb4d9985a44fae37f72720c764387991fe5011d5275fcf876416249429b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-cross-origin 0.9.0
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.