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* and another site called
*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.