-
Notifications
You must be signed in to change notification settings - Fork 36
/
urls.py
156 lines (151 loc) · 5.08 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
"""
Expansion of API-Endpoints for the CMS
"""
from django.urls import include, path, re_path
from .v3.events import events
from .v3.feedback import (
event_feedback,
event_list_feedback,
imprint_page_feedback,
legacy_feedback_endpoint,
map_feedback,
offer_feedback,
offer_list_feedback,
page_feedback,
poi_feedback,
region_feedback,
search_result_feedback,
)
from .v3.imprint import imprint
from .v3.languages import languages
from .v3.location_categories import location_categories
from .v3.locations import locations
from .v3.offers import offers
from .v3.pages import (
children,
pages,
parents,
push_page_translation_content,
single_page,
)
from .v3.pdf_export import pdf_export
from .v3.push_notifications import sent_push_notifications
from .v3.regions import region_by_slug, regions
#: The namespace for this URL config (see :attr:`django.urls.ResolverMatch.app_name`)
app_name = "api"
content_api_urlpatterns = [
path("pages/", pages, name="pages"),
path("locations/", locations, name="locations"),
path("location-categories/", location_categories, name="location_categories"),
path("events/", events, name="events"),
path("page/", single_page, name="single_page"),
path("post/", single_page, name="single_page"),
path("children/", children, name="children"),
path("parents/", parents, name="parents"),
path("pdf/", pdf_export, name="pdf_export"),
path(
"fcm/",
sent_push_notifications,
name="sent_push_notifications",
),
path("imprint/", imprint, name="imprint"),
path("disclaimer/", imprint, name="imprint"),
path("offers/", offers, name="offers"),
path("extras/", offers, name="offers"),
path(
"pushpage/", push_page_translation_content, name="push_page_translation_content"
),
re_path(
r"^feedback/?$",
legacy_feedback_endpoint.legacy_feedback_endpoint,
name="legacy_feedback_endpoint",
),
path(
"feedback/",
include(
[
re_path(
r"^categories/?$",
region_feedback.region_feedback,
name="region_feedback",
),
re_path(r"^page/?$", page_feedback.page_feedback, name="page_feedback"),
re_path(r"^poi/?$", poi_feedback.poi_feedback, name="poi_feedback"),
re_path(
r"^event/?$", event_feedback.event_feedback, name="event_feedback"
),
re_path(
r"^events/?$",
event_list_feedback.event_list_feedback,
name="event_list_feedback",
),
re_path(
r"^imprint-page/?$",
imprint_page_feedback.imprint_page_feedback,
name="imprint_page_feedbacks",
),
re_path(r"^map/?$", map_feedback.map_feedback, name="map_feedback"),
re_path(
r"^search/?$",
search_result_feedback.search_result_feedback,
name="search_result_feedback",
),
re_path(
r"^offers/?$",
offer_list_feedback.offer_list_feedback,
name="offer_list_feedback",
),
re_path(
r"^extras/?$",
offer_list_feedback.offer_list_feedback,
name="offer_list_feedback",
),
re_path(
r"^offer/?$", offer_feedback.offer_feedback, name="offer_feedback"
),
re_path(
r"^extra/?$", offer_feedback.offer_feedback, name="offer_feedback"
),
]
),
),
]
region_api_urlpatterns = [
path("", regions, name="regions"),
path("<slug:region_slug>/", region_by_slug, name="region_by_slug"),
]
#: The url patterns of this module (see :doc:`django:topics/http/urls`)
urlpatterns = [
path("api/regions/", include(region_api_urlpatterns)),
path("wp-json/extensions/v3/sites/", include(region_api_urlpatterns)),
path(
"api/<slug:region_slug>/",
include(
[
path("languages/", languages, name="languages"),
path("offers/", offers, name="offers"),
path("extras/", offers, name="offers"),
path("<slug:language_slug>/", include(content_api_urlpatterns)),
]
),
),
path(
"<slug:region_slug>/",
include(
[
path(
"de/wp-json/extensions/v3/languages/", languages, name="languages"
),
path(
"<slug:language_slug>/wp-json/extensions/v3/",
include(content_api_urlpatterns),
),
path(
"<slug:language_slug>/wp-json/ig-mpdf/v1/pdf/",
pdf_export,
name="pdf_export",
),
]
),
),
]