In my model, I want to use the domain name (HOST), which I use in my views. In the views that can be executed thanks to the query object. But how do I do this? does it simulate methods? What doesn't use "HttpRequest" objects?
Now I set the global HOST value in settings.py and using it, but this is ugly.
In addition, I really do not want to manage the โSitesโ (the โSitesโ application). Is there any way I can capture the "default" hostname of the site?
Thank you very much for your help! (and sorry for my poor english)
source
share