From 03812ecf93d1ba712d28673eb7de4a8f370b46d5 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 28 Jul 2021 09:50:54 +0530 Subject: [PATCH] Register models with django-admin --- app/admin.py | 8 ++++++++ gmba_django/urls.py | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/admin.py b/app/admin.py index 8c38f3f..4efbd1a 100644 --- a/app/admin.py +++ b/app/admin.py @@ -1,3 +1,11 @@ from django.contrib import admin +from .models import * # Register your models here. +admin.site.register(Person) +admin.site.register(Resource) +admin.site.register(Range) +admin.site.register(Method) +admin.site.register(Scale) +admin.site.register(Taxon) +admin.site.register(Field) diff --git a/gmba_django/urls.py b/gmba_django/urls.py index cd34c79..16f2667 100644 --- a/gmba_django/urls.py +++ b/gmba_django/urls.py @@ -58,10 +58,11 @@ def get_paginated(query, request): urlpatterns = [ path('', HomePageView.as_view(), name='home'), - path('offline', OfflinePageView.as_view(), name='offline'), + path('offline/', OfflinePageView.as_view(), name='offline'), path('geodata//', send_from_file, name='send_geodata_file'), path('data/', send_from_file, name='send_data_file'), - path('demo', DemoPageView.as_view(), name='demo'), + path('demo/', DemoPageView.as_view(), name='demo'), + path('admin/', admin.site.urls, name='demo'), # TODO Implement the following # path('reindex/', admin.site.urls),