当前位置: 首页>>代码示例>>Python>>正文


Python LoginView.as_view方法代码示例

本文整理汇总了Python中authentication.views.LoginView.as_view方法的典型用法代码示例。如果您正苦于以下问题:Python LoginView.as_view方法的具体用法?Python LoginView.as_view怎么用?Python LoginView.as_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在authentication.views.LoginView的用法示例。


在下文中一共展示了LoginView.as_view方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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'),
开发者ID:ishanbagul,项目名称:EntityManagement,代码行数:33,代码来源:urls.py

示例2: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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')
)
开发者ID:DanielCho,项目名称:snippod-boilerplate,代码行数:18,代码来源:urls.py

示例3: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
    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')
)
开发者ID:unscsprt,项目名称:TPB-mobile,代码行数:32,代码来源:urls.py

示例4: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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()),
开发者ID:2gis,项目名称:badger-api,代码行数:33,代码来源:urls.py

示例5: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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"),
)
开发者ID:kondajjipriyanka,项目名称:Thinkster,代码行数:24,代码来源:urls.py

示例6: url

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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"),
]
开发者ID:rjhowar2,项目名称:easyNAS,代码行数:13,代码来源:urls.py

示例7: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
# -*- 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'),
)
开发者ID:greenteamer,项目名称:repetitor,代码行数:19,代码来源:urls.py

示例8: url

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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')
]
开发者ID:azflin,项目名称:stock_simulator,代码行数:14,代码来源:urls.py

示例9: url

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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()),
开发者ID:rjk6qe,项目名称:secureshare_api,代码行数:33,代码来源:urls.py

示例10: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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')),
)
开发者ID:pratyushmittal,项目名称:django-angular-fe,代码行数:13,代码来源:urls.py

示例11: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
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'),
)
开发者ID:Lindar90,项目名称:not_google_plus,代码行数:32,代码来源:urls.py

示例12: patterns

# 需要导入模块: from authentication.views import LoginView [as 别名]
# 或者: from authentication.views.LoginView import as_view [as 别名]
'''
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'),
                       )
开发者ID:tomaslu,项目名称:map_editor,代码行数:15,代码来源:urls.py


注:本文中的authentication.views.LoginView.as_view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。