Commit 77419e0b authored by Okhin's avatar Okhin
Browse files

Ajout d'un urlpattern docs/api/ pour avoir au moins un minimum de...

Ajout d'un urlpattern docs/api/ pour avoir au moins un minimum de documentation, ainsi que quelques dépendance
parent 5aa88a01
Pipeline #2494 passed with stages
in 4 minutes and 20 seconds
from rest_framework import routers
from .views import ArticleViewSet, ArticleSearch, ArticleTag
router = routers.DefaultRouter()
router.register(r"articles", ArticleViewSet)
router.register(r"articles-by-tag/(?P<filter_tag>.+)", ArticleTag)
router.register(r"articles-search/(?P<search_keywords>.+)", ArticleSearch)
urlpatterns = router.urls
......@@ -11,6 +11,10 @@ from django.contrib import admin
from core.routers import DefaultRouter
from rp.api.urls import router as rp_router
# Django rest framework documentation
from rest_framework.documentation import include_docs_urls
router = DefaultRouter()
......@@ -22,7 +26,8 @@ urlpatterns = [
url(r"^feeds/", include("rp.feeds.urls", namespace="feeds")),
url(r"^rp/", include("rp.urls", namespace="rp")),
url(r'^accounts/', include('allauth.urls')),
url(r"^users/", include('userprofile.urls', namespace="users"))
url(r"^users/", include('userprofile.urls', namespace="users")),
url(r"^docs/api/", include_docs_urls(title="API de la revue de presse")),
if settings.DEBUG:
......@@ -12,4 +12,7 @@ django-allauth
-e git+
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment