Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 4c4957c

Browse files
timgrahamsongy23
authored andcommitted
Allow installing opencensus-ext-django with Django 2.0 and later (#697)
* Update Django docs to use MIDDLEWARE setting * Allow installing opencensus-ext-django with Django 2.0 and later Fixes #538
1 parent 095cdb6 commit 4c4957c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

contrib/opencensus-ext-django/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44
- Make ProbabilitySampler default
55
- Remove support for Django < 1.11.
6+
- Allow installing with Django 2.0 and later.
67

78
## 0.3.0
89
Released 2019-04-24

contrib/opencensus-ext-django/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Usage
1717
-----
1818

1919
For tracing Django requests, you will need to add the following line to
20-
the ``MIDDLEWARE_CLASSES`` section in the Django ``settings.py`` file.
20+
the ``MIDDLEWARE`` section in the Django ``settings.py`` file.
2121

2222
.. code:: python
2323
24-
MIDDLEWARE_CLASSES = [
24+
MIDDLEWARE = [
2525
...
2626
'opencensus.ext.django.middleware.OpencensusMiddleware',
2727
]

contrib/opencensus-ext-django/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
'Development Status :: 3 - Alpha',
2727
'Intended Audience :: Developers',
2828
'License :: OSI Approved :: Apache Software License',
29+
'Framework :: Django',
30+
'Framework :: Django :: 1.11',
31+
'Framework :: Django :: 2.1',
32+
'Framework :: Django :: 2.2',
2933
'Programming Language :: Python',
3034
'Programming Language :: Python :: 2',
3135
'Programming Language :: Python :: 2.7',
@@ -39,7 +43,7 @@
3943
include_package_data=True,
4044
long_description=open('README.rst').read(),
4145
install_requires=[
42-
'Django >= 1.11.0, < 1.12.0',
46+
'Django >= 1.11',
4347
'opencensus >= 0.7.dev0, < 1.0.0',
4448
],
4549
extras_require={},

docs/trace/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ Django
208208
~~~~~~
209209

210210
For tracing Django requests, you will need to add the following line to
211-
the ``MIDDLEWARE_CLASSES`` section in the Django ``settings.py`` file.
211+
the ``MIDDLEWARE`` section in the Django ``settings.py`` file.
212212

213213
.. code:: python
214214
215-
MIDDLEWARE_CLASSES = [
215+
MIDDLEWARE = [
216216
...
217217
'opencensus.trace.ext.django.middleware.OpencensusMiddleware',
218218
]

0 commit comments

Comments
 (0)