本文整理汇总了Python中authentication.views.LogoutView.as_view方法的典型用法代码示例。如果您正苦于以下问题:Python LogoutView.as_view方法的具体用法?Python LogoutView.as_view怎么用?Python LogoutView.as_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类authentication.views.LogoutView
的用法示例。
在下文中一共展示了LogoutView.as_view方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
###############################################################################
# This file is part of Eskollz
#
# Eskollz is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eskollz is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Eskollz. If not, see <http://www.gnu.org/licenses/>
###############################################################################
from authentication.views import MainLoginView, FirstLoginView, LogoutView, ProfileView
from django.conf.urls import patterns, url
urlpatterns = patterns('',
url('^login/$', MainLoginView.as_view(),
name="ui-login"),
url('^logout/$', LogoutView.as_view(),
name="ui-logout"),
url('^login/firstlogin/', FirstLoginView.as_view(),
name="ui-firstlogin"),
url('^profile/$', ProfileView.as_view(),
name="ui-profile")
)
示例2: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
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'),
)
示例3: format_suffix_patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
from django.conf.urls import url, patterns
from rest_framework.urlpatterns import format_suffix_patterns
from authentication.views import LoginView, LogoutView
urlpatterns = format_suffix_patterns(patterns('authentication.views',
url(r'^login/$', LoginView.as_view(), name='login'),
url(r'^logout/$', LogoutView.as_view(), name='logout'),
))
示例4: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView 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')
)
示例5: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
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()),
)
urlpatterns += staticfiles_urlpatterns()
示例6: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView 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"),
)
示例7: url
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from authentication.views import LogoutView
urlpatterns = [
url(r'^logout', login_required(LogoutView.as_view(), login_url='/'), name='logout')
]
示例8: url
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView 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')
]
示例9: url
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
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()),
url(r'^api/v1/messages/send/$',MessageSendView.as_view()),
示例10: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView import as_view [as 别名]
from django.conf.urls import patterns, include, url
from rest_framework_nested import routers
from authentication.views import AccountViewSet, LoginView, LogoutView
from user_post.views import PostViewSet, AccountPostsViewSet
from .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/', include(router.urls)),
url(r'^api/', include(accounts_router.urls)),
url(r'^api/login/', LoginView.as_view(), name='login'),
url(r'^api/logout/', LogoutView.as_view(), name='logout'),
url(r'^.*$', IndexView.as_view(), name='index'),
)
示例11: patterns
# 需要导入模块: from authentication.views import LogoutView [as 别名]
# 或者: from authentication.views.LogoutView 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'),
)