def logout(): '''Independent logut page that simply strips the user from the session, working with the global configuration set in __init__.py ''' flash(' thanks for hanging out! you are now in anon mode (view only).') utils.logout_user() return redirect(request.args.get('next') or url_for('login'))
def logout(): error = None if request.method == 'POST': logout_user(g.user) g.user = None else: logout_user(g.user) g.user = None error = 'validation failed' return redirect('/admin')
def logout(): logout_user() return redirect(url_for("index"))
def logout(): utils.logout_user() return redirect(url_for('index'))
def test_logout(self): login_user(self.browser) logout_user(self.browser) login_user(self.browser) delete_user(self.browser)
def logout(): logout_user() flash(u"已登出您的账号") return render_template('account/login.html')
def logout(): utils.logout_user() return redirect(url_for('home'));
from utils import logout_user urlpatterns = [ url(r'^$', RedirectView.as_view(url='projects/', permanent=False), name='index'), url(r'^projects/?', include('projects.urls', namespace='projects')), url(r'^survey/?', include('survey.urls', namespace='survey')), url(r'^billing/?', include('userbilling.urls', namespace='billing')), url(r'^admin/?', admin.site.urls), url(r'^login/$', auth_views.login), url(r'^auth/', include('social_django.urls', namespace='social')), url(r'^users/logout/$', auth_views.logout, name='logout'), url(r'^users/login/badfbauth/', views.fbauth_create_not_allowed), url(r'^users/login/', auth_views.login), url(r'^users/new/', logout_user(auth_views.login)), url(r'^api/users/validatepassword/$', api.ValidatePasswordApiView.as_view(), name='users-api-validatepassword'), url(r'^api/users/(?P<user_id>\d+)/projects', projects_api.UserProjectsViewSet.as_view({'get': 'list'}), name='user-projects'), url(r'^api/users/clients/register-url$', api.ClientRegisterUrlApiView.as_view(), name='clients-register-url-api'), url(r'^api/users/clients/(?P<pk>\d+)/$', api.ClientViewSet.as_view({ 'get': 'retrieve', 'put': 'update', 'patch': 'partial_update' }),