Skip to content

Commit c337422

Browse files
authored
Merge branch 'master' into master
2 parents 86ebcb3 + 2842886 commit c337422

31 files changed

+263
-205
lines changed

.travis.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
1-
sudo: false
1+
os: linux
2+
dist: xenial
23
language: python
3-
matrix:
4+
jobs:
45
include:
5-
- python: '2.7'
6-
env: TOXENV=py27-django17-test
7-
- python: '2.7'
8-
env: TOXENV=py27-django18-test
9-
- python: '2.7'
10-
env: TOXENV=py27-django19-test
11-
- python: '2.7'
12-
env: TOXENV=py27-django110-test
136
- python: '2.7'
147
env: TOXENV=py27-django111-test
15-
- python: '3.4'
16-
env: TOXENV=py34-django17-test
17-
- python: '3.4'
18-
env: TOXENV=py34-django18-test
19-
- python: '3.4'
20-
env: TOXENV=py34-django19-test
21-
- python: '3.4'
22-
env: TOXENV=py34-django110-test
238
- python: '3.4'
249
env: TOXENV=py34-django111-test
2510
- python: '3.4'
@@ -31,14 +16,37 @@ matrix:
3116
- python: '3.6'
3217
env: TOXENV=py36-django21-test
3318
- python: '3.6'
34-
env: TOXENV=py36-djangomaster-test
19+
env: TOXENV=py36-django22-test
3520
- python: '3.6'
36-
env: TOXENV=py36-isort
21+
env: TOXENV=py36-django30-test
3722
- python: '3.6'
38-
env: TOXENV=py36-flake
23+
env: TOXENV=py36-djangomaster-test
24+
- python: '3.7'
25+
env: TOXENV=py37-django111-test
26+
- python: '3.7'
27+
env: TOXENV=py37-django20-test
28+
- python: '3.7'
29+
env: TOXENV=py37-django21-test
30+
- python: '3.7'
31+
env: TOXENV=py37-django22-test
32+
- python: '3.7'
33+
env: TOXENV=py37-django30-test
34+
- python: '3.7'
35+
env: TOXENV=py37-djangomaster-test
36+
- python: '3.8'
37+
env: TOXENV=py38-django22-test
38+
- python: '3.8'
39+
env: TOXENV=py38-django30-test
40+
- python: '3.8'
41+
env: TOXENV=py38-djangomaster-test
42+
- python: '3.8'
43+
env: TOXENV=py38-isort
44+
- python: '3.8'
45+
env: TOXENV=py38-flake
3946
allow_failures:
40-
- env: TOXENV=py36-django21-test
4147
- env: TOXENV=py36-djangomaster-test
48+
- env: TOXENV=py37-djangomaster-test
49+
- env: TOXENV=py38-djangomaster-test
4250
install:
4351
- pip install coveralls tox>=2.1
4452
script:
@@ -47,7 +55,7 @@ after_script:
4755
- coveralls
4856
deploy:
4957
provider: pypi
50-
user: djangorequest
58+
username: djangorequest
5159
password:
5260
secure: ihSODos3XjtALjVY8qVDjIeFHfmxjgwABjMmlod4f7IVwf7bST7NLqG0JKPquesNx8mt+1IWdRSTbPKXmhSUqFrgqLts6jKfmj9vtAKKKnKcfNfe548NMC5D5FsYPpRRzX1idUpHxr3O/vo10P2DoQ+b88spmCK/irAtAXvdqd8=
5361
distributions: sdist bdist_wheel

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Changelog for django-request
2+
3+
## 1.5.6.
4+
5+
### Breaking
6+
7+
* Support for Django 1.10 has been dropped.
8+
9+
### Enhancements
10+
11+
* Confirms support for Python 3.8.
12+
13+
* Confirms support for Python 3.7.
14+
15+
* Confirms support for Django 3.0.
16+
17+
* Confirms support for Django 2.2.
18+
19+
### Bug Fixes
20+
21+
* Fixes a performance regression in the admin's requests overview (#200).
22+
23+
## 1.5.5.
24+
25+
### Breaking
26+
27+
* Support for Django 1.7-1.9 has been dropped.
28+
29+
### Bug Fixes
30+
31+
* Fixes series of dates in a _Traffic Graph_ in the admin's requests overview
32+
(#180).
33+
34+
* Fixes crash of ``Modules.graph()`` when Django's translation is disabled i.e.
35+
``USE_I18N = False`` (#168).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2009-2017, Kyle Fuller and Mariusz Felisiak
1+
Copyright (c) 2009-2019, Kyle Fuller and Mariusz Felisiak
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include LICENSE
2+
include CHANGELOG.md
23
include README.md
34
include docs/description.txt
45
include docs/long_description.txt

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ To find the request overview page, please click on Requests inside the admin, th
1818
Requirements
1919
------------
2020

21-
* **Python**: 2.7, 3.4, 3.6
22-
* **Django**: 1.7, 1.8, 1.9, 1.10, 1.11, 2.0
21+
* **Python**: 2.7, 3.4, 3.6, 3.7, 3.8
22+
* **Django**: 1.11, 2.0, 2.1, 2.2, 3.0
2323
* **python-dateutil**
24+
* **six**
2425

2526
django-request [1.5.1](https://pypi.org/project/django-request/1.5.1/) is the last version that supports Django 1.4, 1.5, 1.6.
27+
django-request [1.5.4](https://pypi.org/project/django-request/1.5.4/) is the
28+
last version that supports Django 1.7, 1.8, 1.9.
29+
django-request [1.5.5](https://pypi.org/project/django-request/1.5.5/) is the
30+
last version that supports Django 1.10.
2631

2732
Installation
2833
------------

docs/contents.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ django-request
66

77
.. toctree::
88
:maxdepth: 2
9-
9+
1010
index
1111
settings
1212
install

docs/index.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Quick start guide
1919
To find the request overview page, please click on Requests inside the admin, then "Overview" on the top right, next to "add request".
2020

2121
Once you have installed ``django-request`` you can add it to a django project by following these steps;
22-
23-
#. Install the blog app by adding ``'request'`` to ``INSTALLED_APPS``.
24-
25-
#. Run ``manage.py migrate`` so that Django will create the database tables.
26-
27-
#. Add ``request.middleware.RequestMiddleware`` to ``MIDDLEWARE``. If you use ``django.contrib.auth.middleware.AuthenticationMiddleware``, place ``RequestMiddleware`` after it. If you use ``django.contrib.flatpages.middleware.FlatpageFallbackMiddleware`` place ``request.middleware.RequestMiddleware`` before it else flatpages will be marked as error pages in the admin panel.
28-
29-
#. Make sure that the domain name in django.contrib.sites admin is correct. This is used to calculate unique visitors and top referrers.
22+
23+
#. Install the blog app by adding ``'request'`` to ``INSTALLED_APPS``.
24+
25+
#. Run ``manage.py migrate`` so that Django will create the database tables.
26+
27+
#. Add ``request.middleware.RequestMiddleware`` to ``MIDDLEWARE``. If you use ``django.contrib.auth.middleware.AuthenticationMiddleware``, place ``RequestMiddleware`` after it. If you use ``django.contrib.flatpages.middleware.FlatpageFallbackMiddleware`` place ``request.middleware.RequestMiddleware`` before it else flatpages will be marked as error pages in the admin panel.
28+
29+
#. Make sure that the domain name in django.contrib.sites admin is correct. This is used to calculate unique visitors and top referrers.
3030

3131
django-admin.py
3232
===============

docs/install.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ You can use the following command to clone the git repository:
3232
$ git clone git://github.com/django-request/django-request.git
3333
$ ln -s django-request/request <PYTHONPATH>
3434

35-
.. note:
35+
.. note::
3636

37-
In the last command you will need to change <PYTHONPATH> to a path in your PYTHONPATH, a path which Python has recognized to have python modules within.
37+
In the last command you will need to change ``<PYTHONPATH>`` to a path in
38+
your ``PYTHONPATH``, a path which Python has recognized to have python
39+
modules within.
3840

3941
Using a package-management tool
4042
===============================
@@ -53,7 +55,10 @@ pip is one of the more popular package-management systems for python. You can fi
5355
easy_install
5456
------------
5557

56-
Another option is to use easy_install, first you need to install easy_install. You can find documentation and how to install `easy_install here`_. Once you have easy_install up and running, just type:
58+
Another option is to use ``easy_install``, first you need to install
59+
``easy_install``. You can find documentation and how to install
60+
`easy_install here`_. Once you have ``easy_install`` up and running, just
61+
type:
5762

5863
.. code-block:: bash
5964

docs/settings.txt

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,59 @@ Settings
99

1010
Default: ``False``
1111

12-
If this is set to True, then ajax requests will be ignored and not added to the database. To determine if a request was ajax, we use HttpRequest.is_ajax(), see Django documentation for more information.
12+
If this is set to ``True``, then ajax requests will not be recorded. To
13+
determine if a request was ajax, we use ``HttpRequest.is_ajax()``, see
14+
Django documentation for more information.
1315

1416
``REQUEST_IGNORE_IP``
1517
=====================
1618

1719
Default: ``None``
1820

19-
Any requests from a IP Address in this list will be ignored.
21+
Any requests from an IP address in this list will not be recorded.
2022

2123
``REQUEST_LOG_IP``
22-
=====================
24+
==================
2325

2426
Default: ``True``
2527

26-
If set to False, ip addresses are replaced with REQUEST_IP_DUMMY.
28+
If set to ``False``, IP addresses are replaced with ``REQUEST_IP_DUMMY``.
2729

2830
``REQUEST_IP_DUMMY``
29-
=====================
31+
====================
3032

3133
Default: ``1.1.1.1``
3234

33-
Used dummy address, if REQUEST_LOG_IP is set to False.
35+
Used dummy address, if ``REQUEST_LOG_IP`` is set to False.
3436

3537
``REQUEST_ANONYMOUS_IP``
3638
========================
3739

3840
Default: ``False``
3941

40-
If set to True, last octet of the ip is set to 1.
42+
If set to ``True``, last octet of the IP is set to 1.
4143

4244
``REQUEST_LOG_USER``
43-
=====================
45+
====================
4446

4547
Default: ``True``
4648

47-
If set to False, user are not logged (set to None).
49+
If set to ``False``, user are not logged (set to ``None``).
4850

4951
``REQUEST_IGNORE_USERNAME``
5052
===========================
5153

5254
Default: ``None``
5355

54-
Any requests from users in this list will be ignored.
56+
Any requests from users in this list will not be recorded.
5557

5658
``REQUEST_IGNORE_PATHS``
57-
===========================
59+
========================
5860

5961
Default: ``None``
6062

61-
Any requests which match these paths will be ignored. This setting should be a tuple filled with regex paths.
63+
Any requests which match these paths will not be recorded. This setting should
64+
be a tuple filled with regex paths.
6265

6366
Example:
6467

@@ -73,30 +76,31 @@ Example:
7376

7477
Default: ``None``
7578

76-
Any request with a user agent that matches any pattern in this list will be ignored.
79+
Any request with a user agent that matches any pattern in this list will not be
80+
recorded.
7781

7882
Example:
7983

8084
.. code-block:: python
8185

8286
REQUEST_IGNORE_USER_AGENTS = (
83-
r'^$', # ignore requests with no user agent string set
87+
r'^$', # don't record requests with no user agent string set.
8488
r'Googlebot',
8589
r'Baiduspider',
8690
)
8791

8892
``REQUEST_TRAFFIC_MODULES``
89-
=================================
93+
===========================
9094

91-
Default:
95+
Default:
9296

9397
.. code-block:: python
9498

95-
(
96-
'request.traffic.UniqueVisitor',
97-
'request.traffic.UniqueVisit',
98-
'request.traffic.Hit',
99-
)
99+
(
100+
'request.traffic.UniqueVisitor',
101+
'request.traffic.UniqueVisit',
102+
'request.traffic.Hit',
103+
)
100104

101105
These are all the items in the traffic graph and table on the overview page. If you wish to remove or add a item you can override this setting and set what you want to see. There are also many more options you can add from the following list;
102106

@@ -116,19 +120,19 @@ These are all the items in the traffic graph and table on the overview page. If
116120
``REQUEST_PLUGINS``
117121
===================
118122

119-
Default:
123+
Default:
120124

121125
.. code-block:: python
122126

123-
(
124-
'request.plugins.TrafficInformation',
125-
'request.plugins.LatestRequests',
126-
'request.plugins.TopPaths',
127-
'request.plugins.TopErrorPaths',
128-
'request.plugins.TopReferrers',
129-
'request.plugins.TopSearchPhrases',
130-
'request.plugins.TopBrowsers',
131-
)
127+
(
128+
'request.plugins.TrafficInformation',
129+
'request.plugins.LatestRequests',
130+
'request.plugins.TopPaths',
131+
'request.plugins.TopErrorPaths',
132+
'request.plugins.TopReferrers',
133+
'request.plugins.TopSearchPhrases',
134+
'request.plugins.TopBrowsers',
135+
)
132136

133137
These are all the plugins you can see on the overview page. If you wish to remove or add a plugin you can override this setting and set what you want to see. Here is a list of all the plugins and what they do;
134138

@@ -139,7 +143,9 @@ These are all the plugins you can see on the overview page. If you wish to remov
139143
- ``'request.plugins.TopReferrers'``: Shows a list of top referrals to your site.
140144
- ``'request.plugins.TopSearchPhrases'``: Shows a list of all the search phrases used to find your site.
141145
- ``'request.plugins.TopBrowsers'``: Shows a graph of the top browsers accessing your site.
142-
- ``'request.plugins.ActiveUsers'``: Show a list of active users in the last 5 minutes. This may not be a good idea to use on a large website with lots of active users as it will generate a long list.
146+
- ``'request.plugins.ActiveUsers'``: Shows a list of active users in the last
147+
5 minutes. This may not be a good idea to use on a large website with lots of
148+
active users as it will generate a long list.
143149

144150
``REQUEST_BASE_URL``
145151
====================
@@ -149,15 +155,17 @@ Default: ``'http://%s' % Site.objects.get_current().domain``
149155
This setting should only be set if you use SSL or do not use django.contrib.sites. This is the base url for detecting referral from within the same site.
150156

151157
``REQUEST_ONLY_ERRORS``
152-
=====================================
158+
=======================
153159

154160
Default: ``False``
155161

156-
If this is set to True, django-request will ONLY store error returning request/responses. This can be useful to use django-request purely as a error detection system.
162+
If this is set to ``True``, ``django-request`` will ONLY store error returning
163+
request/responses. This can be useful to use ``django-request`` purely as an
164+
error detection system.
157165

158166
``REQUEST_VALID_METHOD_NAMES``
159167
==============================
160168

161-
Default: ('get', 'post', 'put', 'delete', 'head', 'options', 'trace')
169+
Default: ``('get', 'post', 'put', 'delete', 'head', 'options', 'trace')``
162170

163-
Any request which is not in this tuple/list will be ignored.
171+
Any request which is not in this tuple/list will not be recorded.

request/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
__version__ = '1.5.4'
2-
__copyright__ = 'Copyright (c) 2009-2017, Kyle Fuller, Mariusz Felisiak'
1+
__version__ = '1.5.5'
2+
__copyright__ = 'Copyright (c) 2009-2019, Kyle Fuller, Mariusz Felisiak'
33
__licence__ = 'BSD'
44
__author__ = [
55
'Kyle Fuller <kyle@fuller.li>',
66
'Jannis Leidel (jezdez)',
77
'krisje8 <krisje8@gmail.com>',
88
'Mariusz Felisiak <felisiak.mariusz@gmail.com>',
99
]
10-
__URL__ = 'https://django-request.readthedocs.org/en/latest/'
10+
__URL__ = 'https://django-request.readthedocs.io/en/latest/'

0 commit comments

Comments
 (0)