diff options
author | luxagraf <sng@luxagraf.net> | 2018-11-29 16:57:26 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-11-29 16:57:26 -0600 |
commit | 4974eb58480f413c67f5f6e8fac430186eda2b62 (patch) | |
tree | 7402ecba682dbda38db4b6db221cc8378a390977 /config/base_urls.py | |
parent | 0c2a092e8d8ad33a1c306ee9efca0da96eb56415 (diff) |
uploading all recent changes ahead of sys upgrade
Diffstat (limited to 'config/base_urls.py')
-rw-r--r-- | config/base_urls.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/config/base_urls.py b/config/base_urls.py index 953ceae..c881679 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -15,10 +15,15 @@ from notes.views import ( NotebookViewSet, NoteListView, ) + +# redirect admin as per Adrian holovaty's site +ADMIN_URL = 'https://docs.djangoproject.com/en/dev/ref/contrib/admin/' + router = routers.DefaultRouter() -router.register(r'notes/notebook/', NotebookViewSet, basename="notebook-api") +router.register(r'notes/notebook', NotebookViewSet, basename="notebook-api") router.register(r'notes', NoteViewSet, basename="notes-api") -ADMIN_URL = 'https://docs.djangoproject.com/en/dev/ref/contrib/admin/' + + urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += [ path('admin/', RedirectView.as_view(url=ADMIN_URL)), @@ -31,11 +36,12 @@ urlpatterns += [ path(r'', include('django.contrib.auth.urls')), path(r'', NoteListView.as_view(), name='homepage',), path(r'notes/', include('notes.urls')), - path(r'api/', include(router.urls)), + path(r'api/v1/', include(router.urls)), path(r'<slug>', PageDetailView.as_view(), name="pages"), #path(r'<path>/<slug>/', PageDetailView.as_view(), name="pages"), path(r'api-auth/', include('rest_framework.urls', namespace='rest_framework')) ] +''' if settings.DEBUG: import debug_toolbar urlpatterns = [ @@ -45,3 +51,4 @@ if settings.DEBUG: # url(r'^__debug__/', include(debug_toolbar.urls)), ] + urlpatterns +''' |