I think you need to do some url rewriting outside of django. I haven't
looked at this solution very closely but maybe it will give you some ideas:
http://stackoverflow.com/questions/29938338/django-multi-tenancy.

On Sun, Mar 13, 2016 at 5:06 AM, wh4n <[email protected]> wrote:

> Hello guys,
>
> I have a problem I don't know how to solve. Mezzanine takes cares of the
> multi tenancy. But how can I display other content based on subdomain? For
> example:
>
> I have a site called *thomas.example.com <http://thomas.example.com>* and
> another site called *andrea.example.com <http://andrea.example.com>*
>
> I want a solution to grab with sort of a dynamic/wildcard url to display
> the content based on the user (the same as the domain). To demonstrate:
>
> url(r'(?!www)\w+', 'main.blog_urls', name='wildcard'),
>
> The view:
>
> def wildcard(request, wildcard):
>     subcontent = Blogpost.objects.filter(user=wildcard)
>     return render(request, 'index.html', {'subcontent': subcontent})
>
> I have no clue what so ever how to go further with this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to