From 674cea629dbcbfd99c74261bba17d056fbabd8ac Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 22 Jun 2020 00:03:23 +0100 Subject: clean up import statements: more specific --- urls.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'urls.py') diff --git a/urls.py b/urls.py index 8fc458c..02dddd0 100644 --- a/urls.py +++ b/urls.py @@ -1,17 +1,13 @@ from django.conf import settings -from django.conf.urls import * +from django.conf.urls import url, include from django.views.generic.edit import UpdateView from django.views.generic.list import ListView from django.contrib import admin -#from django.contrib.staticfiles import views as staticviews -#from django.conf.urls.static import static from django.urls import reverse, resolve -# -from .core.views import * # flat import -from .core.views_other import * -from .core.views_caves import * -from .core.views_survex import * -from .core.models import * + +from troggle.core import views_other, views_caves, views_logbooks, views_statistics, views_survex, view_surveys +from troggle.core.views_other import logbook_entry_suggestions +from troggle.core.views_caves import ent, prospecting_image from troggle.core.views_statistics import pathsreport, stats from flatpages import views as flatviews @@ -22,6 +18,9 @@ admin.autodiscover() # url( , # , ) +# Django also provides the reverse function: given an an object, provide the URL +# which is vital to writing code for the webapp. So the URL dispatch is declarative. + actualurlpatterns = [ url(r'^troggle$', views_other.frontpage, name="frontpage"), url(r'^caves$', views_caves.caveindex, name="caveindex"), -- cgit v1.2.3