Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/m/o/moztrap-HEAD/moztrap/view/users/middleware.py   moztrap(Download)
from django.http import HttpResponseRedirect
from moztrap.model.core.auth import AUTO_USERNAME_PREFIX
from . import views
    def process_view(self, request, view_func, view_args, view_kwargs):
        """Redirect users with auto-set username to set their username."""
        if (view_func not in (views.set_username, views.logout) and
            return HttpResponseRedirect(reverse("auth_set_username") + "?next=" + request.path)