These are both interesting solutions. I will give them a try, thanks!
On Tuesday, March 22, 2016 at 2:08:27 AM UTC+1, jorr...@gmail.com wrote:
>
> I'm wondering if I understand the Sites framework correctly... I'm
> building a forum-like project which will initially be accessible from
> mydomai
We ran into this problem and decided to extend Django's
CurrentSiteMiddleware to allow for the specification of a default site to
use in the case when you cannot determine the current site from the host of
the incoming request.
Description of
problem: https://groups.google.com/forum/#!topic/ed
You can try something like below:
class CustomSiteManager(CurrentSiteManager):
def get_queryset(self):
current_site = Site.objects.get_current()
return super(CustomSiteManager, self).get_queryset().filter(
**{self._get_field_name() + '__id': current_site.id})
We
But if I don't set the SITE_ID in settings.py I can't use the
CurrentSiteManager, correct?
On Tuesday, March 22, 2016 at 1:33:39 PM UTC+1, Sai Kiran wrote:
>
> If you need to use single projects for more than domains, create an entry
> in django_site model by giving domain as well as verbose na
If you need to use single projects for more than domains, create an entry
in django_site model by giving domain as well as verbose name. Don't give
any SITE_ID in settings.py, instead of this you can use
Site.objects.get_current() in your view and compare the domain names and
change the header
I'm wondering if I understand the Sites framework correctly... I'm building
a forum-like project which will initially be accessible from mydomain.com .
The project contains several apps like posts, members, ads, etc. Eventually
I would like to create myseconddomain.com, which would have unique p
6 matches
Mail list logo