petale/petale/urls.py

31 lines
1.2 KiB
Python
Raw Normal View History

2017-03-29 17:13:54 +02:00
# Petale - Simple App as Key/Value Storage Interface
# Copyright (C) 2017 Entr'ouvert
#
# This program 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.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
2018-01-11 15:37:04 +01:00
from django.conf.urls import include, url
2017-02-15 17:26:34 +01:00
from django.contrib import admin
2017-10-18 16:53:51 +02:00
from .api_views import PetalAPIView, PetalAPIKeysView
2017-02-20 11:23:00 +01:00
2018-01-11 15:37:04 +01:00
urlpatterns = [
2020-04-06 11:37:53 +02:00
url(r'^admin/', admin.site.urls),
2017-10-18 16:53:51 +02:00
url(r'^api/(?P<partner_name>[\w,-]+)/(?P<cut_uuid>[\w,-]{,255})/$',
PetalAPIKeysView.as_view(),
name='api-keys'),
url(r'^api/(?P<partner_name>[\w,-]+)/(?P<cut_uuid>[\w,-]{,255})/(?P<petal_name>[\w,-]+)/$',
PetalAPIView.as_view(), name='api')
2018-01-11 15:37:04 +01:00
]