auth/views.py
def bootstrap(request):
    """If the visitor is a chirpradio admin, create a user for them."""
    if request.user is None:
        g_user = google_users.get_current_user()
        if g_user is None:
            return http.HttpResponseRedirect(
                google_users.create_login_url(request.path))
        if not google_users.is_current_user_admin():
            return http.HttpResponseForbidden('Not a chirpradio project admin')
        user = User.get_by_email(g_user.email())
        if user:
            return http.HttpResponseForbidden(
                'User %s already exists' % user.email)
        user = User(email=g_user.email(), is_superuser=True)
        user.set_password("test")
        user.save()
        return http.HttpResponseRedirect(auth.create_login_url('/'))
    return http.HttpResponseForbidden("Already logged in")
If the visitor is a chirpradio admin, create a user for them.
If the visitor is a chirpradio admin, create a user for them.
If the visitor is a chirpradio admin create a user for them .
def bootstrap(request):
    if request.user is None:
        g_user = google_users.get_current_user()
        if g_user is None:
            return http.HttpResponseRedirect(
                google_users.create_login_url(request.path))
        if not google_users.is_current_user_admin():
            return http.HttpResponseForbidden('Not a chirpradio project admin')
        user = User.get_by_email(g_user.email())
        if user:
            return http.HttpResponseForbidden(
                'User %s already exists' % user.email)
        user = User(email=g_user.email(), is_superuser=True)
        user.set_password("test")
        user.save()
        return http.HttpResponseRedirect(auth.create_login_url('/'))
    return http.HttpResponseForbidden("Already logged in")
def bootstrap ( request ) : if request . user is None : g_user = google_users . get_current_user ( ) if g_user is None : return http . HttpResponseRedirect ( google_users . create_login_url ( request . path ) ) if not google_users . is_current_user_admin ( ) : return http . HttpResponseForbidden ( 'Not a chirpradio project admin' ) user = User . get_by_email ( g_user . email ( ) ) if user : return http . HttpResponseForbidden ( 'User %s already exists' % user . email ) user = User ( email = g_user . email ( ) , is_superuser = True ) user . set_password ( "test" ) user . save ( ) return http . HttpResponseRedirect ( auth . create_login_url ( '/' ) ) return http . HttpResponseForbidden ( "Already logged in" )
If the visitor is a chirpradio admin, create a user for them.
If the visitor is a chirpradio admin create a user for them .
"""If the visitor is a chirpradio admin, create a user for them."""
request