mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
remote /expofiles/ now for runserver dev
This commit is contained in:
parent
314f600523
commit
18b570d750
@ -74,6 +74,16 @@ class SimpleTest(SimpleTestCase):
|
|||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
def test_import_urls(self):
|
||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls import url, include
|
||||||
|
from django.views.generic.base import RedirectView
|
||||||
|
from django.views.generic.edit import UpdateView
|
||||||
|
from django.views.generic.list import ListView
|
||||||
|
from django.contrib import admin
|
||||||
|
from django.urls import reverse, resolve
|
||||||
|
|
||||||
|
|
||||||
#class SimplePageTest(unittest.TestCase):
|
#class SimplePageTest(unittest.TestCase):
|
||||||
class PageTests(TestCase):
|
class PageTests(TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render, redirect
|
||||||
from django.http import HttpResponse, HttpResponseRedirect, Http404
|
from django.http import HttpResponse, HttpResponseRedirect, Http404
|
||||||
from django.urls import reverse, resolve
|
from django.urls import reverse, resolve
|
||||||
from django.template import Context, loader
|
from django.template import Context, loader
|
||||||
@ -13,6 +13,11 @@ from troggle.core.models_caves import Cave
|
|||||||
import troggle.core.views_caves
|
import troggle.core.views_caves
|
||||||
import troggle.settings as settings
|
import troggle.settings as settings
|
||||||
|
|
||||||
|
def expofiles_redirect(request, path):
|
||||||
|
'''This is used only when running as a test system without a local copy of /expofiles/
|
||||||
|
'''
|
||||||
|
return redirect('http://expo.survex.com/expofiles/' + path)
|
||||||
|
|
||||||
def flatpage(request, path):
|
def flatpage(request, path):
|
||||||
#print(" - FLATPAGES delivering the file: {} as MIME type: {}".format(path,getmimetype(path)))
|
#print(" - FLATPAGES delivering the file: {} as MIME type: {}".format(path,getmimetype(path)))
|
||||||
# try:
|
# try:
|
||||||
|
5
urls.py
5
urls.py
@ -122,7 +122,10 @@ actualurlpatterns = [
|
|||||||
|
|
||||||
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
|
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
|
||||||
|
|
||||||
url(r'^expofiles/(?P<filepath>.*)$', view_surveys.expofilessingle, name="single"), # EXPOFILES
|
# use this next alternative if no local copy of expofiles.
|
||||||
|
url(r'^expofiles/(?P<path>.*)$', flatviews.expofiles_redirect, name="expofiles_redirect"), # to expo.survex.com/expofiles
|
||||||
|
url(r'^expofiles/(?P<filepath>.*)$',view_surveys.expofilessingle, name="single"), # local copy of EXPOFILES
|
||||||
|
|
||||||
# url(r'^javascript/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # JSLIB_URL - unused
|
# url(r'^javascript/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # JSLIB_URL - unused
|
||||||
|
|
||||||
# static views not working, removed as a plugin. Use apache instead to serve these:
|
# static views not working, removed as a plugin. Use apache instead to serve these:
|
||||||
|
Loading…
Reference in New Issue
Block a user