You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
55 lines
1.6 KiB
try:
|
|
from django.urls import include, re_path
|
|
except ImportError:
|
|
from django.conf.urls import include, url as re_path
|
|
|
|
from django.contrib.admin.views.decorators import staff_member_required
|
|
from . import views
|
|
from .registries import global_preferences_registry
|
|
from .forms import GlobalPreferenceForm
|
|
from django.urls import path
|
|
|
|
from .views import (
|
|
AboutUsAPIView,
|
|
FAQCourseAPIView,
|
|
FAQGeneralAPIView,
|
|
SupportAPIView,
|
|
CardAPIView,
|
|
AboutUsDobodiAPIView
|
|
)
|
|
|
|
app_name = "dynamic_preferences"
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
path('about-us/', AboutUsAPIView.as_view(), name='about-us-api'),
|
|
path('faq-course/', FAQCourseAPIView.as_view(), name='faq-course-api'),
|
|
path('faq-general/', FAQGeneralAPIView.as_view(), name='faq-general-api'),
|
|
path('support/', SupportAPIView.as_view(), name='support-api'),
|
|
path('card/', CardAPIView.as_view(), name='card-api'),
|
|
path('about-us-dobodi/', AboutUsDobodiAPIView.as_view(), name='about-us-dobodi-api'),
|
|
|
|
|
|
re_path(
|
|
r"^global/$",
|
|
staff_member_required(
|
|
views.PreferenceFormView.as_view(
|
|
registry=global_preferences_registry, form_class=GlobalPreferenceForm
|
|
)
|
|
),
|
|
name="global",
|
|
),
|
|
re_path(
|
|
r"^global/(?P<section>[\w\ ]+)$",
|
|
staff_member_required(
|
|
views.PreferenceFormView.as_view(
|
|
registry=global_preferences_registry, form_class=GlobalPreferenceForm
|
|
)
|
|
),
|
|
name="global.section",
|
|
),
|
|
re_path(r"^user/", include("dynamic_preferences.users.urls")),
|
|
]
|