1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00
Files
seahub/thirdpart/termsandconditions/urls.py

41 lines
1.6 KiB
Python
Raw Normal View History

2016-07-15 10:47:32 +08:00
"""
Master URL Pattern List for the application. Most of the patterns here should be top-level
pass-offs to sub-modules, who will have their own urls.py defining actions within.
"""
# pylint: disable=W0401, W0614, E1120
2023-06-12 09:53:31 +08:00
from django.urls import path, re_path
2016-07-15 10:47:32 +08:00
from .views import TermsView, AcceptTermsView, EmailTermsView
from .models import DEFAULT_TERMS_SLUG
urlpatterns = (
# # View Default Terms
2023-06-12 09:53:31 +08:00
path('', TermsView.as_view(), {"slug": DEFAULT_TERMS_SLUG}, name="tc_view_page"),
2016-07-15 10:47:32 +08:00
# # View Specific Active Terms
# url(r'^view/(?P<slug>[a-zA-Z0-9_.-]+)/$', TermsView.as_view(), name="tc_view_specific_page"),
2016-07-15 10:47:32 +08:00
# # View Specific Version of Terms
# url(r'^view/(?P<slug>[a-zA-Z0-9_.-]+)/(?P<version>[0-9.]+)/$', TermsView.as_view(), name="tc_view_specific_version_page"),
2016-07-15 10:47:32 +08:00
# # Print Specific Version of Terms
# url(r'^print/(?P<slug>[a-zA-Z0-9_.-]+)/(?P<version>[0-9.]+)/$', TermsView.as_view(template_name="termsandconditions/tc_print_terms.html"), name="tc_print_page"),
2016-07-15 10:47:32 +08:00
# Accept Terms
2023-06-12 09:53:31 +08:00
path('accept/', AcceptTermsView.as_view(), name="tc_accept_page"),
2016-07-15 10:47:32 +08:00
# Accept Specific Terms
2023-06-12 09:53:31 +08:00
re_path(r'^accept/(?P<slug>[a-zA-Z0-9_.-]+)$', AcceptTermsView.as_view(), name="tc_accept_specific_page"),
2016-07-15 10:47:32 +08:00
# Accept Specific Terms Version
2023-06-12 09:53:31 +08:00
re_path(r'^accept/(?P<slug>[a-zA-Z0-9_.-]+)/(?P<version>[0-9\.]+)/$', AcceptTermsView.as_view(), name="tc_accept_specific_version_page"),
2016-07-15 10:47:32 +08:00
# # Email Terms
# url(r'^email/$', EmailTermsView.as_view(), name="tc_email_page"),
2016-07-15 10:47:32 +08:00
# # Email Specific Terms Version
# url(r'^email/(?P<slug>[a-zA-Z0-9_.-]+)/(?P<version>[0-9\.]+)/$', EmailTermsView.as_view(), name="tc_specific_version_page"),
2016-07-15 10:47:32 +08:00
)