Metadata-Version: 2.4
Name: django-request
Version: 1.7.1
Summary: django-request is a statistics module for django. It stores requests in a database for admins to see, it can also be used to get statistics on who is online etc.
Author-email: Kyle Fuller <kyle@fuller.li>
Maintainer-email: Mariusz Felisiak <felisiak.mariusz@gmail.com>
License: Copyright (c) 2009-2025, Kyle Fuller and Mariusz Felisiak
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
            * Redistributions of source code must retain the above copyright
              notice, this list of conditions and the following disclaimer.
            * Redistributions in binary form must reproduce the above copyright
              notice, this list of conditions and the following disclaimer in the
              documentation and/or other materials provided with the distribution.
        
        THIS SOFTWARE IS PROVIDED BY KYLE FULLER ''AS IS'' AND ANY
        EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL KYLE FULLER BE LIABLE FOR ANY
        DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
        (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
        ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
        SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://django-request.readthedocs.io/en/latest/
Project-URL: Documentation, https://django-request.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/django-request/django-request.git
Project-URL: Issues, https://github.com/django-request/django-request/issues
Project-URL: Changelog, https://github.com/django-request/django-request/blob/master/CHANGELOG.md
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: Django>=4.2
Requires-Dist: python-dateutil
Dynamic: license-file

django-request
==============

.. image:: https://github.com/django-request/django-request/workflows/Tests/badge.svg?branch=master
    :alt: Build Status
    :target: https://github.com/django-request/django-request/actions

.. image:: https://coveralls.io/repos/github/django-request/django-request/badge.svg?branch=master
    :alt: Coverage Status
    :target: https://coveralls.io/github/django-request/django-request?branch=master

.. image:: https://img.shields.io/pypi/v/django-request.svg
    :alt: PyPI Version
    :target: https://pypi.org/project/django-request/

django-request is a statistics module for django. It stores requests in a
database for admins to see, it can also be used to get statistics on who is
online etc.

.. image:: https://github.com/django-request/django-request/raw/master/docs/graph.png
    :alt: Traffic graph

As well as a site statistics module, with the ``active_users`` template tag and
manager method you can also use django-request to show who is online in a
certain time::

    Request.objects.active_users(minutes=15)

To find the request overview page, please click on Requests inside the admin,
then “Overview” on the top right, next to “add request”.

Requirements
------------

* **Python**: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
* **Django**: 4.2, 5.0, 5.1, 5.2, 6.0
* **python-dateutil**

django-request 1.5.1_ is the last version that supports Django 1.4, 1.5, 1.6.

django-request 1.5.4_ is the last version that supports Django 1.7, 1.8, 1.9.

django-request 1.5.5_ is the last version that supports Django 1.10.

django-request 1.5.6_ is the last version that supports Django 1.11, 2.0, 2.1,
3.0, 3.1, and Python 2.7 and 3.4.

django-request 1.6.3_ is the last version that supports Django 2.2, 3.2, 4.0,
4.1, and Python 3.6 and 3.7.

.. _`1.5.1`: https://pypi.org/project/django-request/1.5.1/
.. _`1.5.4`: https://pypi.org/project/django-request/1.5.4/
.. _`1.5.5`: https://pypi.org/project/django-request/1.5.5/
.. _`1.5.6`: https://pypi.org/project/django-request/1.5.6/
.. _`1.6.3`: https://pypi.org/project/django-request/1.6.3/

Installation
------------

* Put ``'request'`` in your ``INSTALLED_APPS`` setting.
* Run the command ``manage.py migrate``.
* Add ``request.middleware.RequestMiddleware`` to ``MIDDLEWARE``. If you use
  ``django.contrib.auth.middleware.AuthenticationMiddleware``, place the
  ``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.
* Add ``REQUEST_BASE_URL`` to your settings with the base URL of your site
  (e.g. ``https://www.my.site/``). This is used to calculate unique visitors
  and top referrers. ``REQUEST_BASE_URL`` defaults to
  ``'http://%s' % Site.objects.get_current().domain``.

Detailed documentation
----------------------

For a detailed documentation of django-request, or how to install
django-request please see: `django-request
<https://django-request.readthedocs.org/en/latest/>`_ or the docs/ directory.
