https://github.com/dlrsp/django-sites-extra
Django application to extend the standard "sites" framework with extra utils.
https://github.com/dlrsp/django-sites-extra
Last synced: about 1 year ago
JSON representation
Django application to extend the standard "sites" framework with extra utils.
- Host: GitHub
- URL: https://github.com/dlrsp/django-sites-extra
- Owner: DLRSP
- License: mit
- Created: 2023-12-23T18:30:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T08:06:22.000Z (over 1 year ago)
- Last Synced: 2024-10-17T20:23:49.704Z (over 1 year ago)
- Language: Python
- Size: 422 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# django-sites-extra [](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
[](https://pypi.python.org/pypi/django-sites-extra)
## GitHub  
## Test [](https://codecov.io/github/DLRSP/django-sites-extra?branch=main) [](https://results.pre-commit.ci/latest/github/DLRSP/django-sites-extra/main) [](https://github.com/DLRSP/django-sites-extra/actions/workflows/ci.yaml)
## Check Demo Project
* Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-sites-extra)
## Requirements
- Python 3.8+ supported.
- Django 3.2+ supported.
## Setup
1. Install from **pip**:
```shell
pip install django-sites-extra
```
2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
# ...
"sites_extra",
# ...
]
```
3. Execute Django's command `migrate` inside your project's root:
```shell
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`:
```python
TEMPLATES = [
{
# ...
"OPTIONS": {
"context_processors": [
# ...
"sites_extra.context_processors.info",
# ...
],
},
},
]
```
5. Optionally, but sugguested, the Django's Current Site middleware is enabled inside `settings.py`:
```python
MIDDLEWARE = (
# ...
"django.contrib.sites.middleware.CurrentSiteMiddleware",
# ...
)
```
## Run Example Project
```shell
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