urls.py 1.6 KB

1234567891011121314151617181920212223242526
  1. from django.urls import path
  2. from .views import index, other_page, BLoginView, profile, BLogoutView, ChangeUserInfoView, BPasswordChangeView, RegisterUserView, RegisterDoneView, user_activate, DeleteUserView
  3. from .views import by_rubric, detail, profile_ad_detail, profile_ad_add, profile_ad_change, profile_ad_delete
  4. app_name = 'main'
  5. urlpatterns = [
  6. path('', index, name='index'),
  7. path('<int:rubric_pk>/<int:pk>/', detail, name='detail'),
  8. path('<int:pk>/', by_rubric, name='by_rubric'),
  9. path('<str:page>/', other_page, name='other'),
  10. path('accounts/register/activate/<str:sign>/', user_activate, name='register_activate'),
  11. path('accounts/register/done/', RegisterDoneView.as_view(), name='register_done'),
  12. path('accounts/register/', RegisterUserView.as_view(), name='register'),
  13. path('accounts/login/', BLoginView.as_view(), name='login'),
  14. path('accounts/profile/delete/', DeleteUserView.as_view(), name='profile_delete'),
  15. path('accounts/profile/change/', ChangeUserInfoView.as_view(), name='profile_change'),
  16. path('accounts/profile/change/<int:pk>/', profile_ad_change, name='profile_ad_change'),
  17. path('accounts/profile/delete/<int:pk>/', profile_ad_delete, name='profile_ad_delete'),
  18. path('account/profile/add/', profile_ad_add, name='profile_ad_add'),
  19. path('accounts/profile/<int:pk>/', profile_ad_detail, name='profile_ad_detail'),
  20. path('accounts/profile/', profile, name='profile'),
  21. path('accounts/logout/', BLogoutView.as_view(), name='logout'),
  22. path('accounts/password/change/', BPasswordChangeView.as_view(), name='password_change'),
  23. ]