2016-08-04 11:08:12 +02:00
|
|
|
from django.conf import settings
|
2016-01-09 09:58:22 +01:00
|
|
|
from django.conf.urls import include, url
|
2015-06-16 10:37:23 +02:00
|
|
|
from django.views.generic import RedirectView
|
2013-11-29 16:47:31 +01:00
|
|
|
|
2017-08-30 12:58:51 +02:00
|
|
|
from openslides.mediafiles.views import protected_serve
|
2015-07-10 15:07:11 +02:00
|
|
|
from openslides.utils.plugins import get_all_plugin_urlpatterns
|
2015-02-18 16:07:39 +01:00
|
|
|
from openslides.utils.rest_api import router
|
2012-04-15 11:24:40 +02:00
|
|
|
|
2015-07-10 15:07:11 +02:00
|
|
|
urlpatterns = get_all_plugin_urlpatterns()
|
|
|
|
|
2016-01-09 09:58:22 +01:00
|
|
|
urlpatterns += [
|
2017-08-30 12:58:51 +02:00
|
|
|
url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL.lstrip('/'), protected_serve, {'document_root': settings.MEDIA_ROOT}),
|
2015-06-30 02:37:57 +02:00
|
|
|
url(r'^(?P<url>.*[^/])$', RedirectView.as_view(url='/%(url)s/', permanent=True)),
|
2015-01-30 11:58:36 +01:00
|
|
|
url(r'^rest/', include(router.urls)),
|
2018-01-26 14:56:42 +01:00
|
|
|
url(r'^agenda/', include('openslides.agenda.urls')),
|
2015-03-09 15:40:54 +01:00
|
|
|
url(r'^motions/', include('openslides.motions.urls')),
|
2015-06-16 10:37:23 +02:00
|
|
|
url(r'^users/', include('openslides.users.urls')),
|
2015-06-17 09:45:00 +02:00
|
|
|
|
2015-07-10 15:07:11 +02:00
|
|
|
# The urls.py of the core app has to be the last entry. It contains the
|
|
|
|
# main entry points for OpenSlides' browser clients.
|
2015-06-17 09:45:00 +02:00
|
|
|
url(r'^', include('openslides.core.urls')),
|
2016-01-09 09:58:22 +01:00
|
|
|
]
|