Skip to content
urls.py 2.11 KiB
Newer Older
Bengfort's avatar
Bengfort committed
# (c) 2020 MPIB <https://www.mpib-berlin.mpg.de/>,
#
# This file is part of castellum-scheduler.
#
# castellum-scheduler is free software; you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# Castellum is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with Castellum. If not, see
# <http://www.gnu.org/licenses/>.

Bengfort's avatar
Bengfort committed
from django.contrib.auth.views import LoginView
from django.contrib.auth.views import LogoutView
Bengfort's avatar
Bengfort committed
from django.contrib.flatpages.views import flatpage
Bengfort's avatar
Bengfort committed
from django.contrib import admin
Bengfort's avatar
Bengfort committed
from django.urls import path
Bengfort's avatar
Bengfort committed
from django.urls import re_path
from django.views.i18n import JavaScriptCatalog
Bengfort's avatar
Bengfort committed

Bengfort's avatar
Bengfort committed
from .main.views import InvitationApiView
Bengfort's avatar
Bengfort committed
from .main.views import InvitationUpdateView
from .main.views import ScheduleCreateView
from .main.views import ScheduleDeleteView
from .main.views import ScheduleListView
from .main.views import ScheduleUpdateView


Bengfort's avatar
Bengfort committed
urlpatterns = [
Bengfort's avatar
Bengfort committed
    path('', ScheduleListView.as_view(), name='index'),
    path('new/', ScheduleCreateView.as_view(), name='schedule-create'),
    path('<uuid:uuid>/', ScheduleUpdateView.as_view(), name='schedule-update'),
    path('<uuid:uuid>/delete/', ScheduleDeleteView.as_view(), name='schedule-delete'),
    path(
Bengfort's avatar
Bengfort committed
        'invitations/<uuid:schedule__uuid>/<token>/',
        InvitationUpdateView.as_view(),
Bengfort's avatar
Bengfort committed
        name='invitation',
    ),
Bengfort's avatar
Bengfort committed
        'api/<uuid:schedule__uuid>/<token>/',
        InvitationApiView.as_view(),
Bengfort's avatar
Bengfort committed
        name='api-invitation',
    ),
Bengfort's avatar
Bengfort committed
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
Bengfort's avatar
Bengfort committed
    path('admin/', admin.site.urls),
    path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
Bengfort's avatar
Bengfort committed
    re_path(r'^(?P<url>.*/)$', flatpage),
Bengfort's avatar
Bengfort committed
]