server/python/django2/renkanmanager/versioning/v1_0_urls.py
author ymh <ymh.work@gmail.com>
Sun, 14 Jul 2024 21:59:51 +0200
changeset 665 69d13e7dd286
parent 605 13d355fd09bf
permissions -rw-r--r--
add file encoding
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
665
69d13e7dd286 add file encoding
ymh <ymh.work@gmail.com>
parents: 605
diff changeset
     1
# -*- coding: utf-8 -*-
590
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     2
from django.conf.urls import include, url
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     3
from django.contrib import admin
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     4
from renkanmanager.api.views import RenkanList, RenkanDetail, WorkspaceList, WorkspaceDetail, RevisionList, RevisionDetail
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     5
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     6
urlpatterns = [
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     7
    url(r'^renkans/$', RenkanList.as_view(), name='renkan_list'),
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
     8
    url(r'^workspaces/(?P<workspace_guid>[\w-]+)/renkans/$', RenkanList.as_view(), name='renkan_list_workspace'),
605
13d355fd09bf updated uri to allow optional trailing slash on single resource URIs (django automatic redirects don't carry over the Authorization header that can sometimes be needed, for instance with OAuth)
durandn
parents: 590
diff changeset
     9
    url(r'^renkans/(?P<renkan_guid>[\w-]+)/?$', RenkanDetail.as_view(), name='renkan_detail'),
590
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
    10
    url(r'^workspaces/$', WorkspaceList.as_view(), name='workspace_list'),
605
13d355fd09bf updated uri to allow optional trailing slash on single resource URIs (django automatic redirects don't carry over the Authorization header that can sometimes be needed, for instance with OAuth)
durandn
parents: 590
diff changeset
    11
    url(r'^workspaces/(?P<workspace_guid>[\w-]+)/?$', WorkspaceDetail.as_view(), name='workspace_detail'),
590
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
    12
    url(r'^renkans/(?P<renkan_guid>[\w-]+)/revisions/$', RevisionList.as_view(), name='revision_list'),
605
13d355fd09bf updated uri to allow optional trailing slash on single resource URIs (django automatic redirects don't carry over the Authorization header that can sometimes be needed, for instance with OAuth)
durandn
parents: 590
diff changeset
    13
    url(r'^renkans/(?P<renkan_guid>[\w-]+)/revisions/(?P<revision_guid>[\w-]+)/?$', RevisionDetail.as_view(), name='revision_detail')
590
3be2a86981c2 API versioning via namespace
durandn
parents:
diff changeset
    14
]