16👍
✅
I have it. It is PREPEND_WWW in settings.
https://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#prepend-www
11👍
As docs say
If PREPEND_WWW is True, URLs that lack a leading “www.” will be redirected to the same URL with a leading “www.”
By default PREPEND_WWW
is set to False
. You can change that to True in settings.
PREPEND_WWW = True
To make this work, You have to include CommonMiddleware in Your middlewares
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
)
- Define pagination page_size per-view in Django Rest Framework
- Django 'ascii' codec can't encode character
- Get all tags from taggit
- How to have a nested inline formset within a form in Django?
- "Show all" for more than 200 items in Django Admin
- Commit manually in Django data migration
- GeoDjango distance filter with distance value stored within model – query
Source:stackexchange.com