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.3.31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e80ca92c53d910e5197f73a0840968eea6003d05f448c786f2825a3a8234f1 |
|
MD5 | 21a93e7ce4fdee121e38510473c3c819 |
|
BLAKE2b-256 | cb2f677f73e8de33560bdec95ad5105f554a13f550c3e80fc8c7cd7583c2677d |