-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
31 lines (29 loc) · 1.01 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
import aldryn_addons.urls
from aldryn_django.utils import i18n_patterns
from django.urls import include, path,re_path
from django.conf import settings
from wagtail.images.views.serve import ServeView
from apps.api import urls as api_urls
from apps.helpers.view import data_switch
if settings.STAGE == 'local':
browser_reload_patterns = [
path("__reload__/", include("django_browser_reload.urls")),
]
else:
browser_reload_patterns = [
]
urlpatterns = (
[
re_path(r'^images/([^/]*)/(\d*)/([^/]*)/[^/]*$', ServeView.as_view(action='redirect'),
name='wagtailimages_serve'),
path('api/', include(api_urls)),
path('', include('social_django.urls', namespace='social')),
path('data_switch/', data_switch, name='data_switch'),
]
+ browser_reload_patterns
+ aldryn_addons.urls.patterns()
+ i18n_patterns(
# add your own i18n patterns here
*aldryn_addons.urls.i18n_patterns() # MUST be the last entry!
)
)