Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.18 KB

README.md

File metadata and controls

38 lines (32 loc) · 1.18 KB

django-request-logger

Python Django PyPi

Overview

'django-request-logger' is a Django package designed to capture and store HTTP requests essential information, including IP address, user model, user agent, HTTP method, timestamp, and more.

Installation

Install the package using pip:

pip install django-request-track

Usage

  1. Add request_track to your INSTALLED_APPS in your Django project's settings:

    INSTALLED_APPS = [
        # ...
        'request_track',
        # ...
    ]
  2. Register the middleware in your MIDDLEWARE settings:

    MIDDLEWARE = [
        # ...
        'request_track.middleware.LoggingRequestMiddleware'
    ]
  3. Migrate:

        python manage.py migrate

After it all work will be done automatically and you can see the information through the Django admin panel or work with the "RequestLog" model.