Ravenports generated: 27 Aug 2020 21:24
[ravenports.git] / bucket_86 / python-django-cors-headers
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-django-cors-headers
4 VERSION=                3.5.0
5 KEYWORDS=               python
6 VARIANTS=               py38 py37
7 SDESC[py37]=            Django handler for CORS server headers (PY37)
8 SDESC[py38]=            Django handler for CORS server headers (PY38)
9 HOMEPAGE=               https://github.com/adamchainz/django-cors-headers
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/d/django-cors-headers
14 DISTFILE[1]=            django-cors-headers-3.5.0.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 DISTNAME=               django-cors-headers-3.5.0
25
26 GENERATED=              yes
27
28 [PY37].BUILDRUN_DEPENDS_ON=             python-Django:single:py37
29 [PY37].USES_ON=                         python:py37
30
31 [PY38].BUILDRUN_DEPENDS_ON=             python-Django:single:py38
32 [PY38].USES_ON=                         python:py38
33
34 [FILE:2586:descriptions/desc.single]
35 django-cors-headers
36 ===================
37
38 A Django App that adds Cross-Origin Resource Sharing (CORS) headers to
39 responses. This allows in-browser requests to your Django application from
40 other origins.
41
42 About CORS
43 ----------
44
45 Adding CORS headers allows your resources to be accessed on other domains.
46 It's
47 important you understand the implications before adding the headers, since
48 you
49 could be unintentionally opening up your site's private data to others.
50
51 Some good resources to read on the subject are:
52
53 * Julia Evans' [introductory comic]
54 * The [Wikipedia Page]
55 * The [MDN Article]
56 * The [HTML5 Rocks Tutorial]
57
58 Requirements
59 ------------
60
61 Python 3.5 to 3.8 supported.
62
63 Django 2.2 to 3.0 supported.
64
65 ----
66
67 **Are your tests slow?**
68 Check out my book [Speed Up Your Django Tests] which covers loads of best
69 practices so you can write faster, more accurate tests.
70
71 ----
72
73 Setup
74 -----
75
76 Install from **pip**:
77
78 .. code-block:: sh
79
80     python -m pip install django-cors-headers
81
82 and then add it to your installed apps:
83
84 .. code-block:: python
85
86     INSTALLED_APPS = [
87         ...
88         'corsheaders',
89         ...
90    ]
91
92 Make sure you add the trailing comma or you might get a ModuleNotFoundError
93 (see [this blog
94 post]).
95
96 You will also need to add a middleware class to listen in on responses:
97
98 .. code-block:: python
99
100     MIDDLEWARE = [
101         ...
102         'corsheaders.middleware.CorsMiddleware',
103         'django.middleware.common.CommonMiddleware',
104         ...
105    ]
106
107 CorsMiddleware should be placed as high as possible, especially before any
108 middleware that can generate responses such as Django's CommonMiddleware or
109 Whitenoise's WhiteNoiseMiddleware. If it is not before, it will not be able
110 to add the CORS headers to these responses.
111
112 Also if you are using CORS_REPLACE_HTTPS_REFERER it should be placed before
113 Django's CsrfViewMiddleware (see more below).
114
115 About
116 -----
117
118 **django-cors-headers** was created in January 2013 by Otto Yiu. It went
119 unmaintained from August 2015 and was forked in January 2016 to the package
120 `django-cors-middleware
121 <https://github.com/zestedesavoir/django-cors-middleware>`_
122 by Laville Augustin at Zeste de Savoir.
123 In September 2016, Adam Johnson, Ed Morley, and others gained maintenance
124 responsibility for **django-cors-headers**
125 ([Issue 110])
126 from Otto Yiu.
127 Basically all of the changes in the forked **django-cors-middleware** were
128 merged back, or re-implemented in a different way, so it should be possible
129 to
130 switch back. If there's a feature that hasn't been merged, please open an
131 issue
132 about it.
133
134 **django-cors-headers** has had `40+ contributors
135
136
137 [FILE:111:distinfo]
138 db82b2840f667d47872ae3e4a4e0a0d72fbecb42779b8aa233fa8bb965f7836a        82619 django-cors-headers-3.5.0.tar.gz
139