OpenSlides/server/openslides/urls.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

28 lines
960 B
Python

from django.conf import settings
from django.conf.urls import include, url
from django.views.generic import RedirectView
from openslides.mediafiles.views import check_serve, protected_serve
from openslides.utils.rest_api import router
from .core import views as core_views
urlpatterns = [
# URLs for /media/
url(
r"^%s(?P<path>.*)$" % settings.MEDIA_URL.lstrip("/"),
protected_serve,
{"document_root": settings.MEDIA_ROOT},
),
url(r"^check-media/(?P<path>.*)$", check_serve),
# URLs for the rest system, redirect /rest to /rest/
url(r"^rest$", RedirectView.as_view(url="/rest/", permanent=True)),
url(r"^rest/", include(router.urls)),
# Other urls defined by modules and plugins
url(r"^apps/", include("openslides.urls_apps")),
# Main entry point for all angular pages.
# Has to be the last entry in the urls.py
url(r"^(?P<path>.*)$", core_views.IndexView.as_view(), name="index"),
]