We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django 1.8.2, django-hosts 1.2
Django
django-hosts
Config:
host_patterns = patterns('', host(r'', 'project.urls', name='root'), host(r'www', 'project.urls', name='www'), ...
Django shell example:
>>> from django_hosts.resolvers import reverse >>> reverse("namespace:view", kwargs={'arg':8, 'pk':1}, host='www') '//www/arg8/pk/1/' >>> reverse("namespace:view", kwargs={'arg':8, 'pk':1}, host='root') '///arg8/pk/1/'
Why isn't it //www.domain.com/arg8/pk/1/?
//www.domain.com/arg8/pk/1/
The text was updated successfully, but these errors were encountered:
Ok, adding
PARENT_HOST = ALLOWED_HOSTS[0]
to the settings.py helped. What do you think about defaulting PARENT_HOST to ALLOWED_HOSTS[0]? Looks reasonable to me.
settings.py
PARENT_HOST
ALLOWED_HOSTS[0]
Sorry, something went wrong.
No branches or pull requests
Django
1.8.2,django-hosts
1.2Config:
Django shell example:
Why isn't it
//www.domain.com/arg8/pk/1/
?The text was updated successfully, but these errors were encountered: