From a6167210a2462d791bd0cbe88f374ae7c525b321 Mon Sep 17 00:00:00 2001 From: zunzun Date: Sat, 10 Dec 2016 11:40:06 -0600 Subject: [PATCH] Updated to run with old and new versions of django --- settings.py | 10 ++++++++++ urls.py | 51 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/settings.py b/settings.py index db84e65..6ccaada 100755 --- a/settings.py +++ b/settings.py @@ -82,6 +82,16 @@ os.path.join(ROOT_PATH, 'templates'), ) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': TEMPLATE_DIRS, + 'APP_DIRS': True, + 'OPTIONS': { + # ... some options here ... + }, + }, +] INSTALLED_APPS = ( # 'django.contrib.auth', # 'django.contrib.contenttypes', diff --git a/urls.py b/urls.py index d08de20..9cc672b 100755 --- a/urls.py +++ b/urls.py @@ -1,26 +1,37 @@ - - - - from django.views.decorators.cache import cache_page from django.conf.urls import * import zunzun.views import settings -urlpatterns = patterns('', - (r"^$", zunzun.views.HomePageView), - - (r"^StatusAndResults/", zunzun.views.StatusView), - - (r"^CharacterizeData/([123])/$", zunzun.views.LongRunningProcessView), - (r"^StatisticalDistributions/([1])/$", zunzun.views.LongRunningProcessView), - (r"^FunctionFinder__1___/([23])/$", zunzun.views.LongRunningProcessView), - (r"^FunctionFinderResults/([23])/$", zunzun.views.LongRunningProcessView), - (r"^FitEquation__1___/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), - (r"^Equation/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), - - (r"^EvaluateAtAPoint/$", zunzun.views.EvaluateAtAPointView), +try: + urlpatterns = patterns('', + (r"^$", zunzun.views.HomePageView), + + (r"^StatusAndResults/", zunzun.views.StatusView), + + (r"^CharacterizeData/([123])/$", zunzun.views.LongRunningProcessView), + (r"^StatisticalDistributions/([1])/$", zunzun.views.LongRunningProcessView), + (r"^FunctionFinder__1___/([23])/$", zunzun.views.LongRunningProcessView), + (r"^FunctionFinderResults/([23])/$", zunzun.views.LongRunningProcessView), + (r"^FitEquation__1___/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), + (r"^Equation/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), + + (r"^EvaluateAtAPoint/$", zunzun.views.EvaluateAtAPointView), - (r"^AllEquations/([23])/(.+)/$", zunzun.views.AllEquationsView), - (r"^Feedback/$", zunzun.views.FeedbackView), -) + (r"^AllEquations/([23])/(.+)/$", zunzun.views.AllEquationsView), + (r"^Feedback/$", zunzun.views.FeedbackView), + ) +except: + urlpatterns = [ + url(r"^$", zunzun.views.HomePageView), + url(r"^StatusAndResults/", zunzun.views.StatusView), + url(r"^CharacterizeData/([123])/$", zunzun.views.LongRunningProcessView), + url(r"^StatisticalDistributions/([1])/$", zunzun.views.LongRunningProcessView), + url(r"^FunctionFinder__1___/([23])/$", zunzun.views.LongRunningProcessView), + url(r"^FunctionFinderResults/([23])/$", zunzun.views.LongRunningProcessView), + url(r"^FitEquation__1___/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), + url(r"^Equation/([23])/(.+)/(.+)/$", zunzun.views.LongRunningProcessView), + url(r"^EvaluateAtAPoint/$", zunzun.views.EvaluateAtAPointView), + url(r"^AllEquations/([23])/(.+)/$", zunzun.views.AllEquationsView), + url(r"^Feedback/$", zunzun.views.FeedbackView), +]