Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sites-extra-0.1.2.tar.gz (26.4 kB view hashes)

Uploaded Source

Built Distribution

django_sites_extra-0.1.2-py2.py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page