本文整理汇总了Python中authentication.views.LoginView类的典型用法代码示例。如果您正苦于以下问题:Python LoginView类的具体用法?Python LoginView怎么用?Python LoginView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LoginView类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: patterns
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
router.register(r'retail_partners', RetailPartnerViewSet)
accounts_router = routers.NestedSimpleRouter(
router, r'accounts', lookup='account'
)
accounts_router.register(r'retail_partners', AccountRetailPartnersViewSet)
urlpatterns = patterns(
'',
# ... URLs
url(r'^api/v1/', include(router.urls)),
url(r'^api/v1/', include(accounts_router.urls)),
url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'),
url(r'^get_rp_profile$', get_rp_profile, name='get_rp_profile'),
url(r'^get_city_profile$', get_city_profile, name='get_city_profile'),
url(r'^fetch_data_for_validation$', fetch_data_for_validation, name='fetch_data_for_validation'),
url(r'^retail_partner/update$', update_rp_data, name='update_rp_data'),
url(r'^deactivate$', deactivate_retail_partner, name='deactivate'),
url(r'^deactivate_admin$', deactivate_retail_partner_admin, name='deactivate_admin'),
url(r'^reactivate$', reactivate_retail_partner, name='reactivate'),
url(r'^reactivate_admin$', reactivate_retail_partner_admin, name='reactivate_admin'),
url(r'^validate$', validate_rp_data, name='validate'),
url(r'^send_for_review$', send_for_review, name='send_for_review'),
url(r'^send_mail$', send_mail, name='send_mail'),
url(r'^retail-partners$', app_retail_partners, name='app_retail_partners'),
url(r'^report_retail_partner$', report_rp_data, name='report_rp_data'),
url('^.*$', IndexView.as_view(), name='index'),
示例2: patterns
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from authentication.views import AccountViewSet, LoginView, LogoutView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
urlpatterns = patterns(
'',
url(r'^', include(router.urls)),
url(r'auth/login/', LoginView.as_view(), name='login'),
url(r'auth/logout/', LogoutView.as_view(), name='logout')
)
示例3: patterns
reset_client_id
from authentication.views import LoginView, logout_view
admin.autodiscover()
urlpatterns = patterns('tpb_mobile.views',
# Examples:
url(r'^$', SearchView.as_view(), name='home'),
url(r'^queue/$', QueueView.as_view(), name='queue'),
url(r'^settings/$', SettingsView.as_view(), name='settings'),
url(r'^register/$', RegistrationView.as_view(), name='register'),
# url(r'^torrent/(?P<created>(.)*)/(?P<user>(.)*)/(?P<seeders>(\d)*)/(?P<leechers>(\d)*)/(?P<url>(.)*)/$', TorrentPageView.as_view(), name='torrent'),
url(r'^torrent/$', TorrentPageView.as_view(), name='torrent'),
url(r'^middleman/$', torrent_form_middleman, name='middleman'),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns('api.utils',
url(r'^api/create_torrent/$', create_torrent_record, name='create_torrent'),
url(r'^api/delete_torrent/$', delete_torrent_record, name='delete_torrent'),
url(r'^api/retrieve_queue/$', retrieve_queue, name='retrieve_queue'),
url(r'^api/register_client/$', register_client, name='register_client'),
url(r'^api/reset_client_id/$', reset_client_id, name='reset_client_id')
)
urlpatterns += patterns('authentication.views',
url(r'^login/', LoginView.as_view(), name='login'),
url(r'^logout/$', logout_view, name='logout')
)
示例4: patterns
router.register(r'launches', LaunchViewSet)
router.register(r'testresults', TestResultViewSet)
router.register(r'testresults_negative', TestResultNegativeViewSet)
router.register(r'launch-items', LaunchItemViewSet)
router.register(r'tasks', TaskResultViewSet)
router.register(r'comments', CommentViewSet)
router.register(r'bugs', BugViewSet)
router.register(r'stages', StageViewSet)
router.register(r'metrics', MetricViewSet)
router.register(r'metricvalues', MetricValueViewSet)
urlpatterns = patterns(
'',
url(r'^$', Base.as_view(), name='dashboard'),
url(r'^{0}/'.format(settings.CDWS_API_PATH), include(router.urls)),
url(r'^{0}/auth/login'.format(settings.CDWS_API_PATH), LoginView.as_view(),
name='api-auth-login'),
url(r'^{0}/auth/logout'.format(settings.CDWS_API_PATH),
LogoutView.as_view(), name='api-auth-logout'),
url(r'^{0}/auth/get'.format(settings.CDWS_API_PATH),
IsAuthorizedView.as_view(), name='api-auth-get'),
url(r'^{0}/auth/update'.format(settings.CDWS_API_PATH),
UpdateSettingsView.as_view(), name='api-auth-update'),
url(r'^admin/', include(admin.site.urls)),
url(r'^{0}/external/jenkins/(?P<project>[^/.]+)/'.
format(settings.CDWS_API_PATH), JenkinsViewSet.as_view()),
url(r'^{0}/external/rundeck/(?P<project>[^/.]+)/'.
format(settings.CDWS_API_PATH), RundeckViewSet.as_view()),
url(r'^{0}/external/report-xunit/(?P<testplan_id>[^/.]+)/'
r'(?P<xunit_format>[^/.]+)/(?P<filename>[^/.]+)'.
format(settings.CDWS_API_PATH), ReportFileViewSet.as_view()),
示例5: patterns
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from authentication.views import AccountViewSet, LoginView, LogoutView
from posts.views import AccountPostsViewSet, PostViewSet
from thinkster_django_angular_boilerplate.views import IndexView
router = routers.SimpleRouter()
router.register(r"accounts", AccountViewSet)
router.register(r"posts", PostViewSet)
accounts_router = routers.NestedSimpleRouter(router, r"accounts", lookup="account")
accounts_router.register(r"posts", AccountPostsViewSet)
urlpatterns = patterns(
"",
url(r"^api/v1/", include(router.urls)),
url(r"^api/v1", include(accounts_router.urls)),
url(r"^api/v1/auth/login/$", LoginView.as_view(), name="login"),
url(r"^api/v1/auth/logout/$", LogoutView.as_view(), name="logout"),
url("^.*$", IndexView.as_view(), name="index"),
)
示例6: url
from django.conf.urls import url
from django.views.generic import TemplateView
from authentication.views import AuthenticationView, LoginView, logout_view
urlpatterns = [
url(r'^$', LoginView.as_view(), name="login_screen"),
url(r'(?P<error_code>[0-9]+)/$', LoginView.as_view(), name="login_error"),
url(r'^authenticate/', AuthenticationView.as_view(), name="authenticate"),
url(r'^logout', logout_view, name="logout_user"),
]
示例7: patterns
# -*- coding: utf-8 -*-
#!/usr/bin/env python
from django.conf.urls import patterns, include, url
from authentication.views import LoginView, RegisterTeacherView, RegisterStudentView, LogoutView, ProfileView, TeacherAccountView, StudentAccountView, AdminAccountView
urlpatterns = patterns('project.core.views',
url('^profile/$', ProfileView.as_view(), name='profile'),
url('^teacher-account/$', TeacherAccountView.as_view(), name='teacher-account'),
url('^student-account/$', StudentAccountView.as_view(), name='student-account'),
url('^admin-account/$', AdminAccountView.as_view(), name='admin-account'),
url('^login/$', LoginView.as_view(), name='login'),
url('^logout/$', LogoutView.as_view(), name='logout'),
url('^register-teacher/$', RegisterTeacherView.as_view(), name='register-teacher'),
url('^register-student/$', RegisterStudentView.as_view(), name='register-student'),
)
示例8: url
from django.conf.urls import url, include
from views import IndexView
from authentication.views import CreateUserView, LoginView, LogoutView
urlpatterns = [
url(r'^api/register/$', CreateUserView.as_view()),
url(r'^api/login/$', LoginView.as_view()),
url(r'^api/logout/$', LogoutView.as_view()),
url(r'^api/', include('stock_simulator_api.urls')),
url('^$', IndexView.as_view(), name='index')
]
示例9: url
from secureshare_messages.views import MessageInboxView, MessageSendView, MessageOutboxView, MessageDecryptView
from authentication.views import RegisterView, LoginView, LogoutView, SiteManagerView, GroupView
#router = routers.SimpleRouter()
#router.register(r'reports',ReportViewSet, base_name='Report')
#router.register(r'messages',MessageViewSet, base_name='Message')
urlpatterns = [
# Examples:
# url(r'^$', 'secureshare.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
#url(r'^api/v1/',include(router.urls)),
url(r'^api/v1/users/register/',RegisterView.as_view()),
url(r'^api/v1/users/login/',LoginView.as_view()),
url(r'^api/v1/users/logout/',LogoutView.as_view()),
url(r'api/v1/users/groups/',GroupView.as_view()),
url(r'^api/v1/users/site_manager/',SiteManagerView.as_view()),
# url(r'^api/v1/encrypt/generate/', GenerateView.as_view()),
url(r'^api/v1/reports/$',ReportView.as_view()),
url(r'^api/v1/reports/(?P<pk>[0-9]+)/$',ReportView.as_view()),
url(r'^api/v1/reports/folders/$',FolderView.as_view()),
url(r'^api/v1/reports/folders/(?P<pk>[0-9]+)/$',FolderView.as_view()),
url(r'^api/v1/messages/inbox/$',MessageInboxView.as_view()),
url(r'^api/v1/messages/inbox/(?P<pk>[0-9]+)/$',MessageInboxView.as_view()),
url(r'^api/v1/messages/outbox/$',MessageOutboxView.as_view()),
url(r'^api/v1/messages/outbox/(?P<pk>[0-9]+)/$',MessageOutboxView.as_view()),
示例10: patterns
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from authentication.views import UserCreateView, LoginView
urlpatterns = patterns('',
url('^api/v1/auth/register/$', UserCreateView.as_view(), name='create_user'),
url('^api/v1/auth/login/$', LoginView.as_view(), name='login_user'),
# Static should be last
url(r'^', TemplateView.as_view(template_name='index.html')),
)
示例11: patterns
from django.conf.urls import patterns, url, include
from rest_framework_nested import routers
from authentication.views import AccountViewSet, LoginView, LogoutView
from posts.views import PostViewSet, AccountPostViewSet
from not_google_plus.views import IndexView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
router.register(r'posts', PostViewSet)
accounts_router = routers.NestedSimpleRouter(
router, r'accounts', lookup='account'
)
accounts_router.register(r'posts', AccountPostViewSet)
urlpatterns = patterns(
'',
url(r'^api/v1/', include(router.urls)),
url(r'^api/v1/', include(accounts_router.urls)),
url(r'api/v1/login', LoginView.as_view(), name='login'),
url(r'api/v1/logout/$', LogoutView.as_view(), name='logout'),
url('^.*$', IndexView.as_view(), name='index'),
)
示例12: patterns
'''
Created on Dec 11, 2013
'''
from django.conf.urls import patterns, url
from authentication.views import RegisterView, LoginView, logout_user,\
authenticated_page
urlpatterns = patterns('',
url(r'^register$', RegisterView.as_view(), name='authentication_register'),
url(r'^login$', LoginView.as_view(), name='authentication_login'),
url(r'^logout_user$', logout_user, name='authentication_logout_user'),
url(r'^authenticated_page$', authenticated_page, name='authentication_authenticated_page'),
)