- Check the demo repo on GitHub
- Python 3.8+ supported.
- Django 3.2+ supported.
- Install from pip:
pip install django-sites-extra
- Modify
settings.py
by adding the app toINSTALLED_APPS
:INSTALLED_APPS = [ # ... "sites_extra", # ... ]
- Execute Django's command
migrate
inside your project's root:python manage.py migrate Running migrations: Applying sites_extra.0001_initial... OK
- Modify
settings.py
by adding the app's context processor toTEMPLATES
:TEMPLATES = [ { # ... "OPTIONS": { "context_processors": [ # ... "sites_extra.context_processors.info", # ... ], }, }, ]
- Optionally, but sugguested, the Django's Current Site middleware is enabled inside
settings.py
:MIDDLEWARE = ( # ... "django.contrib.sites.middleware.CurrentSiteMiddleware", # ... )
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