0👍
I don’t really understand you question, but maybe some fiddling with request.urlconf and custom middleware is the solution?
https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.urlconf
0👍
The Django sites framework does provide some tools to deal with multiple domains, but they all assume you have a different SITE_ID for each deployment.
That said. You can probably write up a middleware that checks request.META['HTTP_HOST']
and then passes that information off to your view in whatever way you wish.
At that point you can just follow the Django docs on using a site custom manager for your models.
- [Django]-Deleting periodic task for celery scheduler in `settings.py` will not delete the actual task
- [Django]-Python – Single thread executor already being used, would deadlock
- [Django]-Upgrading to django 1.11 many to many column not found
- [Django]-ElasticSearch term suggest on analyzed field returns no suggestions
- [Django]-Django admin with websocket
0👍
Have you run apache, I think this kind of request can be handle via APACHE’s rewrite engine
- [Django]-Django List deserialization in rest-framework
- [Django]-Redirect http to https safely for Heroku app
- [Django]-Django migrations: how to generate database from current state of the models (good old syncdb –all)
- [Django]-How to connect Celery worker to django test database
- [Django]-Django can not delete csrftoken after logout
Source:stackexchange.com