aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-11-29 16:57:26 -0600
committerluxagraf <sng@luxagraf.net>2018-11-29 16:57:26 -0600
commit4974eb58480f413c67f5f6e8fac430186eda2b62 (patch)
tree7402ecba682dbda38db4b6db221cc8378a390977 /config
parent0c2a092e8d8ad33a1c306ee9efca0da96eb56415 (diff)
uploading all recent changes ahead of sys upgrade
Diffstat (limited to 'config')
-rw-r--r--config/base_urls.py13
-rw-r--r--config/settings.py4
2 files changed, 12 insertions, 5 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
+'''
diff --git a/config/settings.py b/config/settings.py
index b95c18d..da75f57 100644
--- a/config/settings.py
+++ b/config/settings.py
@@ -64,7 +64,7 @@ THIRD_PARTY_APPS = [
'taggit_serializer',
'django_extensions',
'rest_framework',
- 'debug_toolbar'
+ #'debug_toolbar'
]
LOCAL_APPS = [
'utils',
@@ -80,7 +80,7 @@ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
+ #'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',