Example app

The testapp project is both an example of how you could use this library and serves as the reference for our test suite.

Running the testapp

The testapp is essentially a standard django project, however there is no manage.py file. Instead, you have to use the django-admin command (manage.py is only a wrapper around this anyway).

  1. First, clone the repository to get all the necessary files:

    git clone https://github.com/jazzband/django-cookie-consent.git
    cd django-cookie-consent
  2. Create a virtual environment for the project, using any supported Python version (3.8+) and activate it

    python3.10 -m venv ./env
    source ./env/bin/activate
  3. Install the application and dependencies

    pip install .
  4. Prepare your settings and local project instance

    export DJANGO_SETTINGS_MODULE=testapp.settings PYTHONPATH=.
    django-admin migrate
    django-admin loaddata testapp/fixture.json
    django-admin createsuperuser
  5. Start the development server

    django-admin runserver

You can now navigate to and