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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file django-sites-extra-0.1.2.tar.gz.

File metadata

  • Download URL: django-sites-extra-0.1.2.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for django-sites-extra-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2852a42fdb78a7f03db036048f27261d233573117a526b535e8c840f0e36fc42
MD5 1dc0a19fd665a67e5b45cd5e8c2c6c5b
BLAKE2b-256 2f985ff5f0a67a7f4fdab99b883ed064b8aa9077e74d157da0e176a8c4dd43d8

See more details on using hashes here.

File details

Details for the file django_sites_extra-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_sites_extra-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 934577cbec4fe95b152e4dab6df12b004cad7dd6aa057461744feea9a6f228a3
MD5 db1cfab3059e648d6d6ad5e3df7ee8f0
BLAKE2b-256 02ea63c91a62ccbd4ce9fd0f689f7d8e79fb77c41433612658133217ee047831

See more details on using hashes here.

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