Skip to content

Django application to extend the standard "sites" framework with extra utils.

License

Notifications You must be signed in to change notification settings

DLRSP/django-sites-extra

Repository files navigation

django-sites-extra PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Check Demo Project

  • Check the demo repo on GitHub

Requirements

  • Python 3.8+ supported.
  • Django 3.2+ supported.

Setup

  1. Install from pip:
    pip install django-sites-extra
  2. Modify settings.py by adding the app to INSTALLED_APPS:
    INSTALLED_APPS = [
        # ...
        "sites_extra",
        # ...
    ]
  3. Execute Django's command migrate inside your project's root:
    python manage.py migrate
    Running migrations:
      Applying sites_extra.0001_initial... OK
  4. Modify settings.py by adding the app's context processor to TEMPLATES:
    TEMPLATES = [
        {
            # ...
            "OPTIONS": {
                "context_processors": [
                    # ...
                    "sites_extra.context_processors.info",
                    # ...
                ],
            },
        },
    ]
  5. Optionally, but sugguested, the Django's Current Site middleware is enabled inside settings.py:
    MIDDLEWARE = (
        # ...
        "django.contrib.sites.middleware.CurrentSiteMiddleware",
        # ...
    )

Run Example Project

git clone --depth=50 --branch=django-sites-extra https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver

Now browser the app @ http://127.0.0.1:8000

About

Django application to extend the standard "sites" framework with extra utils.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages