Django Library PyGal
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

urls.py 1.0KB

1234567891011121314151617181920212223242526
  1. from django.shortcuts import redirect
  2. from django.urls import path
  3. from django.urls.base import reverse
  4. from . import views
  5. urlpatterns = [
  6. #
  7. # settings and other stuff
  8. #
  9. path('', lambda request: redirect(reverse('pygal-view', kwargs={'viewtype': 'user'}), permanent=False)),
  10. path('profile', views.pygal_profile, name='pygal-profile'),
  11. path('helpview/<str:page>', views.pygal_helpview, name='pygal-helpview'),
  12. #
  13. # changes
  14. #
  15. path('addtag/<path:rel_path>', views.pygal_addtag, name='pygal-addtag'),
  16. path('edittag/<int:tag_id>', views.pygal_tagedit, name='pygal-edittag'),
  17. path('setfavourite/<int:set_favourite>/<path:rel_path>', views.pygal_favourite, name='pygal-setfavourite'),
  18. #
  19. # views
  20. #
  21. path('userview/search', views.pygal_responses, name='search'),
  22. path('<str:responsetype>/<str:datatype>/', views.pygal_responses, name='pygal-responses'),
  23. path('<str:responsetype>/<str:datatype>/<path:rel_path>', views.pygal_responses, name='pygal-responses'),
  24. ]