adds .local:port to the site domain links for local development if settings.DEBUG is True
Project description
Installation
$ [sudo] pip install django-site-local-middleware
Examples
settings.py
DEBUG=True
MIDDLEWARE = [
...
'django_site_local_middleware.middleware.SiteLocalMiddleware'
...
]
/etc/hosts
127.0.0.1 site.com.local
$ python manage.py runserver 0.0.0.0:8000
before | after |
---|---|
<a href="http://site.com/"> |
<a href="http://site.com.local:8000/"> |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-site-local-middleware-2020.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d64149235c6fc183bc7bc3a5ddbdc69b0ae4c19ebfb632e48f1dbcf90518904 |
|
MD5 | 7ec010fccb288f2b0ea82718aae52976 |
|
BLAKE2b-256 | 58c02ef8f7172163503d83bf4bb1cd750a89bc29914994145a5ff75a262504ca |