Commit 44ea61f2 authored by Daniel W Bond's avatar Daniel W Bond

added api to the project-level urls, including support for versioning (/api redirects to /api/v1)

parent 54786b45
......@@ -6,6 +6,7 @@ from django.conf import settings
from django.contrib import admin
from django.views.decorators.cache import cache_page
from django.contrib.auth.decorators import login_required
from django.views.generic import RedirectView
# third party imports
from haystack.views import SearchView
from cas.views import login, logout
......@@ -53,5 +54,11 @@ urlpatterns = [
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(,
# api
url(r'^api/v1/', include('api.urls')),
# establishing versioning already so we easily can move to another API release
# without specific version redirects to latest version
url(r'^api/$', RedirectView.as_view(url="v1/")),
# location of user-uploaded media files from (for local)
] #+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Markdown is supported
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