From 1afe78da8f206f52081b888cf1af6b38e7dcd2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 19 Jan 2015 16:38:05 +0100 Subject: [PATCH] Adding initial contrib modules system --- taiga/contrib_routers.py | 19 +++++++++++++++++++ taiga/urls.py | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 taiga/contrib_routers.py diff --git a/taiga/contrib_routers.py b/taiga/contrib_routers.py new file mode 100644 index 00000000..311f96c3 --- /dev/null +++ b/taiga/contrib_routers.py @@ -0,0 +1,19 @@ +# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014 Jesús Espino +# Copyright (C) 2014 David Barragán +# 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 . + +from taiga.base import routers + +router = routers.DefaultRouter(trailing_slash=False) diff --git a/taiga/urls.py b/taiga/urls.py index f2de3105..1c4baac0 100644 --- a/taiga/urls.py +++ b/taiga/urls.py @@ -20,9 +20,11 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from .routers import router +from .contrib_routers import router as contrib_router urlpatterns = [ url(r'^api/v1/', include(router.urls)), + url(r'^api/v1/', include(contrib_router.urls)), url(r'^api/v1/api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^admin/', include(admin.site.urls)), ]