For some reason I do not know why, when I write this context processor I
can't go to /accounts/update/ anymore. It displays a 404.
def user_subdomain(request):
from django.shortcuts import get_object_or_404
username = request.META['HTTP_HOST'].split('.')[0]
user = get_object_or_404(User, username=username)
return {
'user': user,
}
Everything else works just fine, and I can get to the login page etc.
--
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.