赞
踩
- from django.urls import path
-
- from users_app.views import RegisterView, LoginView, LogoutView
-
- app_name = 'users'
- urlpatterns = [
- path("register/", RegisterView.as_view, name="register"),
- path("login/", LoginView.as_view, name="login"),
- path("logout/", LogoutView.as_view, name="logout"),
- ]
as_view作为一个方法后面需要+()
- path("register/", RegisterView.as_view(), name="register"),
- path("login/", LoginView.as_view(), name="login"),
- path("logout/", LogoutView.as_view(), name="logout"),
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。