From c7722c418ac1576ab7b0ae3017e0b1a584a7c553 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 23 Dec 2014 10:39:56 +0100 Subject: [PATCH] Create basic admin site --- booking/admin.py | 11 +++++++++++ duckbook/urls.py | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 booking/admin.py diff --git a/booking/admin.py b/booking/admin.py new file mode 100644 index 0000000..be4d63c --- /dev/null +++ b/booking/admin.py @@ -0,0 +1,11 @@ +from django.contrib import admin +from booking.models import Species, Location, Competence, Duck, Booking, DuckCompetence, DuckName, DuckNameVote + +admin.site.register(Species) +admin.site.register(Location) +admin.site.register(Competence) +admin.site.register(Duck) +admin.site.register(Booking) +admin.site.register(DuckCompetence) +admin.site.register(DuckName) +admin.site.register(DuckNameVote) diff --git a/duckbook/urls.py b/duckbook/urls.py index 39233d1..548772f 100644 --- a/duckbook/urls.py +++ b/duckbook/urls.py @@ -1,7 +1,11 @@ from django.conf.urls import patterns, include, url +from django.contrib import admin + +admin.autodiscover() urlpatterns = patterns( '', + url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('accounts.urls', namespace = 'accounts')), url('', include('booking.urls', namespace = 'booking')), )