mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 16:51:54 +00:00
Remove PHOTOS_ROOT and DPhoto class
This commit is contained in:
parent
931aa4e3cb
commit
d4ac28af18
@ -50,10 +50,10 @@ class QMsFoundInline(admin.TabularInline):
|
|||||||
extra=1
|
extra=1
|
||||||
|
|
||||||
|
|
||||||
class PhotoInline(admin.TabularInline):
|
# class PhotoInline(admin.TabularInline):
|
||||||
model = DPhoto
|
# model = DPhoto
|
||||||
exclude = ['is_mugshot' ]
|
# exclude = ['is_mugshot' ]
|
||||||
extra = 1
|
# extra = 1
|
||||||
|
|
||||||
|
|
||||||
class PersonTripInline(admin.TabularInline):
|
class PersonTripInline(admin.TabularInline):
|
||||||
@ -67,7 +67,8 @@ class LogbookEntryAdmin(TroggleModelAdmin):
|
|||||||
prepopulated_fields = {'slug':("title",)}
|
prepopulated_fields = {'slug':("title",)}
|
||||||
search_fields = ('title','expedition__year')
|
search_fields = ('title','expedition__year')
|
||||||
date_heirarchy = ('date')
|
date_heirarchy = ('date')
|
||||||
inlines = (PersonTripInline, PhotoInline, QMsFoundInline)
|
# inlines = (PersonTripInline, PhotoInline, QMsFoundInline)
|
||||||
|
inlines = (PersonTripInline, QMsFoundInline)
|
||||||
class Media:
|
class Media:
|
||||||
css = {
|
css = {
|
||||||
"all": ("css/troggleadmin.css",)
|
"all": ("css/troggleadmin.css",)
|
||||||
@ -116,7 +117,7 @@ class EntranceAdmin(TroggleModelAdmin):
|
|||||||
search_fields = ('caveandentrance__cave__kataster_number',)
|
search_fields = ('caveandentrance__cave__kataster_number',)
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(DPhoto)
|
#admin.site.register(DPhoto)
|
||||||
admin.site.register(Cave, CaveAdmin)
|
admin.site.register(Cave, CaveAdmin)
|
||||||
admin.site.register(Area)
|
admin.site.register(Area)
|
||||||
#admin.site.register(OtherCaveName)
|
#admin.site.register(OtherCaveName)
|
||||||
|
@ -11,6 +11,9 @@ from django.core.urlresolvers import reverse
|
|||||||
from troggle.core.models import Cave, Entrance
|
from troggle.core.models import Cave, Entrance
|
||||||
import troggle.flatpages.models
|
import troggle.flatpages.models
|
||||||
|
|
||||||
|
"""Pretty much all of this is now replaced by databaseRest.py
|
||||||
|
I don't know why this still exists
|
||||||
|
"""
|
||||||
databasename=settings.DATABASES['default']['NAME']
|
databasename=settings.DATABASES['default']['NAME']
|
||||||
expouser=settings.EXPOUSER
|
expouser=settings.EXPOUSER
|
||||||
expouserpass=settings.EXPOUSERPASS
|
expouserpass=settings.EXPOUSERPASS
|
||||||
@ -89,9 +92,10 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
def make_dirs(obj):
|
def make_dirs(obj):
|
||||||
"""Make directories that troggle requires"""
|
"""Make directories that troggle requires"""
|
||||||
|
pass
|
||||||
# should also deal with permissions here.
|
# should also deal with permissions here.
|
||||||
if not os.path.isdir(settings.PHOTOS_ROOT):
|
#if not os.path.isdir(settings.PHOTOS_ROOT):
|
||||||
os.mkdir(settings.PHOTOS_ROOT)
|
#os.mkdir(settings.PHOTOS_ROOT)
|
||||||
|
|
||||||
def import_caves(obj):
|
def import_caves(obj):
|
||||||
import parsers.caves
|
import parsers.caves
|
||||||
|
@ -780,31 +780,32 @@ class QM(TroggleModel):
|
|||||||
def wiki_link(self):
|
def wiki_link(self):
|
||||||
return u"%s%s%s" % ('[[QM:',self.code(),']]')
|
return u"%s%s%s" % ('[[QM:',self.code(),']]')
|
||||||
|
|
||||||
photoFileStorage = FileSystemStorage(location=settings.PHOTOS_ROOT, base_url=settings.PHOTOS_URL)
|
#photoFileStorage = FileSystemStorage(location=settings.PHOTOS_ROOT, base_url=settings.PHOTOS_URL)
|
||||||
class DPhoto(TroggleImageModel):
|
#class DPhoto(TroggleImageModel):
|
||||||
caption = models.CharField(max_length=1000,blank=True,null=True)
|
#caption = models.CharField(max_length=1000,blank=True,null=True)
|
||||||
contains_logbookentry = models.ForeignKey(LogbookEntry,blank=True,null=True)
|
#contains_logbookentry = models.ForeignKey(LogbookEntry,blank=True,null=True)
|
||||||
contains_person = models.ManyToManyField(Person,blank=True,null=True)
|
#contains_person = models.ManyToManyField(Person,blank=True,null=True)
|
||||||
file = models.ImageField(storage=photoFileStorage, upload_to='.',)
|
# replace link to copied file with link to original file location
|
||||||
is_mugshot = models.BooleanField(default=False)
|
#file = models.ImageField(storage=photoFileStorage, upload_to='.',)
|
||||||
contains_cave = models.ForeignKey(Cave,blank=True,null=True)
|
#is_mugshot = models.BooleanField(default=False)
|
||||||
contains_entrance = models.ForeignKey(Entrance, related_name="photo_file",blank=True,null=True)
|
#contains_cave = models.ForeignKey(Cave,blank=True,null=True)
|
||||||
|
#contains_entrance = models.ForeignKey(Entrance, related_name="photo_file",blank=True,null=True)
|
||||||
#nearest_survey_point = models.ForeignKey(SurveyStation,blank=True,null=True)
|
#nearest_survey_point = models.ForeignKey(SurveyStation,blank=True,null=True)
|
||||||
nearest_QM = models.ForeignKey(QM,blank=True,null=True)
|
#nearest_QM = models.ForeignKey(QM,blank=True,null=True)
|
||||||
lon_utm = models.FloatField(blank=True,null=True)
|
#lon_utm = models.FloatField(blank=True,null=True)
|
||||||
lat_utm = models.FloatField(blank=True,null=True)
|
#lat_utm = models.FloatField(blank=True,null=True)
|
||||||
|
|
||||||
class IKOptions:
|
# class IKOptions:
|
||||||
spec_module = 'core.imagekit_specs'
|
# spec_module = 'core.imagekit_specs'
|
||||||
cache_dir = 'thumbs'
|
# cache_dir = 'thumbs'
|
||||||
image_field = 'file'
|
# image_field = 'file'
|
||||||
|
|
||||||
#content_type = models.ForeignKey(ContentType)
|
#content_type = models.ForeignKey(ContentType)
|
||||||
#object_id = models.PositiveIntegerField()
|
#object_id = models.PositiveIntegerField()
|
||||||
#location = generic.GenericForeignKey('content_type', 'object_id')
|
#location = generic.GenericForeignKey('content_type', 'object_id')
|
||||||
|
|
||||||
def __unicode__(self):
|
# def __unicode__(self):
|
||||||
return self.caption
|
# return self.caption
|
||||||
|
|
||||||
scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
|
scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
|
||||||
def get_scan_path(instance, filename):
|
def get_scan_path(instance, filename):
|
||||||
|
@ -197,6 +197,9 @@ class SurvexScansFolder(models.Model):
|
|||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return urlparse.urljoin(settings.URL_ROOT, reverse('surveyscansfolder', kwargs={"path":re.sub("#", "%23", self.walletname)}))
|
return urlparse.urljoin(settings.URL_ROOT, reverse('surveyscansfolder', kwargs={"path":re.sub("#", "%23", self.walletname)}))
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return unicode(self.walletname) + " (Survey Scans Folder)"
|
||||||
|
|
||||||
class SurvexScanSingle(models.Model):
|
class SurvexScanSingle(models.Model):
|
||||||
ffile = models.CharField(max_length=200)
|
ffile = models.CharField(max_length=200)
|
||||||
@ -208,6 +211,9 @@ class SurvexScanSingle(models.Model):
|
|||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return urlparse.urljoin(settings.URL_ROOT, reverse('surveyscansingle', kwargs={"path":re.sub("#", "%23", self.survexscansfolder.walletname), "file":self.name}))
|
return urlparse.urljoin(settings.URL_ROOT, reverse('surveyscansingle', kwargs={"path":re.sub("#", "%23", self.survexscansfolder.walletname), "file":self.name}))
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return "Survey Scan Image: " + unicode(self.name) + " in " + unicode(self.survexscansfolder)
|
||||||
|
|
||||||
|
|
||||||
class TunnelFile(models.Model):
|
class TunnelFile(models.Model):
|
||||||
|
@ -3,7 +3,7 @@ from django.utils.html import conditional_escape
|
|||||||
from django.template.defaultfilters import stringfilter
|
from django.template.defaultfilters import stringfilter
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from troggle.core.models import QM, DPhoto, LogbookEntry, Cave
|
from troggle.core.models import QM, LogbookEntry, Cave
|
||||||
import re, urlparse
|
import re, urlparse
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
@ -120,13 +120,13 @@ def wiki_to_html_short(value, autoescape=None):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
linkText=None
|
linkText=None
|
||||||
|
|
||||||
try:
|
# try:
|
||||||
photo=DPhoto.objects.get(file=matchdict['photoName'])
|
# photo=DPhoto.objects.get(file=matchdict['photoName'])
|
||||||
if not linkText:
|
# if not linkText:
|
||||||
linkText=str(photo)
|
# linkText=str(photo)
|
||||||
res=r'<a href=' + photo.get_admin_url() +'>' + linkText + '</a>'
|
# res=r'<a href=' + photo.get_admin_url() +'>' + linkText + '</a>'
|
||||||
except Photo.DoesNotExist:
|
# except Photo.DoesNotExist:
|
||||||
res = r'<a class="redtext" href="">make new photo</a>'
|
# res = r'<a class="redtext" href="">make new photo</a>'
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def photoSrcRepl(matchobj):
|
def photoSrcRepl(matchobj):
|
||||||
|
@ -184,7 +184,7 @@ def pathsreport(request):
|
|||||||
"MEDIA_ADMIN_DIR" : MEDIA_ADMIN_DIR,
|
"MEDIA_ADMIN_DIR" : MEDIA_ADMIN_DIR,
|
||||||
"MEDIA_ROOT" : MEDIA_ROOT,
|
"MEDIA_ROOT" : MEDIA_ROOT,
|
||||||
"MEDIA_URL" : MEDIA_URL,
|
"MEDIA_URL" : MEDIA_URL,
|
||||||
"PHOTOS_ROOT" : PHOTOS_ROOT,
|
#"PHOTOS_ROOT" : PHOTOS_ROOT,
|
||||||
"PHOTOS_URL" : PHOTOS_URL,
|
"PHOTOS_URL" : PHOTOS_URL,
|
||||||
"PYTHON_PATH" : PYTHON_PATH,
|
"PYTHON_PATH" : PYTHON_PATH,
|
||||||
"REPOS_ROOT_PATH" : REPOS_ROOT_PATH,
|
"REPOS_ROOT_PATH" : REPOS_ROOT_PATH,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from troggle.core.models import Cave, Expedition, Person, LogbookEntry, PersonExpedition, PersonTrip, DPhoto, QM
|
from troggle.core.models import Cave, Expedition, Person, LogbookEntry, PersonExpedition, PersonTrip, QM
|
||||||
#from troggle.core.forms import UploadFileForm
|
#from troggle.core.forms import UploadFileForm, DPhoto
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.template import loader, Context
|
from django.template import loader, Context
|
||||||
@ -30,7 +30,7 @@ def frontpage(request):
|
|||||||
expeditions = Expedition.objects.order_by("-year")
|
expeditions = Expedition.objects.order_by("-year")
|
||||||
logbookentry = LogbookEntry
|
logbookentry = LogbookEntry
|
||||||
cave = Cave
|
cave = Cave
|
||||||
photo = DPhoto
|
#photo = DPhoto
|
||||||
from django.contrib.admin.templatetags import log
|
from django.contrib.admin.templatetags import log
|
||||||
return render(request,'frontpage.html', locals())
|
return render(request,'frontpage.html', locals())
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ def dirsredirect():
|
|||||||
"""Make directories that troggle requires and sets up page redirects
|
"""Make directories that troggle requires and sets up page redirects
|
||||||
"""
|
"""
|
||||||
#should also deal with permissions here.
|
#should also deal with permissions here.
|
||||||
if not os.path.isdir(settings.PHOTOS_ROOT):
|
#if not os.path.isdir(settings.PHOTOS_ROOT):
|
||||||
os.mkdir(settings.PHOTOS_ROOT)
|
#os.mkdir(settings.PHOTOS_ROOT)
|
||||||
for oldURL, newURL in [("indxal.htm", reverse("caveindex"))]:
|
for oldURL, newURL in [("indxal.htm", reverse("caveindex"))]:
|
||||||
f = troggle.flatpages.models.Redirect(originalURL = oldURL, newURL = newURL)
|
f = troggle.flatpages.models.Redirect(originalURL = oldURL, newURL = newURL)
|
||||||
f.save()
|
f.save()
|
||||||
|
@ -7,34 +7,35 @@ from utils import save_carefully
|
|||||||
from HTMLParser import HTMLParser
|
from HTMLParser import HTMLParser
|
||||||
from unidecode import unidecode
|
from unidecode import unidecode
|
||||||
|
|
||||||
def saveMugShot(mugShotPath, mugShotFilename, person):
|
# def saveMugShot(mugShotPath, mugShotFilename, person):
|
||||||
if mugShotFilename.startswith(r'i/'): #if filename in cell has the directory attached (I think they all do), remove it
|
# if mugShotFilename.startswith(r'i/'): #if filename in cell has the directory attached (I think they all do), remove it
|
||||||
mugShotFilename=mugShotFilename[2:]
|
# mugShotFilename=mugShotFilename[2:]
|
||||||
else:
|
# else:
|
||||||
mugShotFilename=mugShotFilename # just in case one doesn't
|
# mugShotFilename=mugShotFilename # just in case one doesn't
|
||||||
|
|
||||||
dummyObj=models.DPhoto(file=mugShotFilename)
|
# dummyObj=models.DPhoto(file=mugShotFilename)
|
||||||
|
|
||||||
#Put a copy of the file in the right place. mugShotObj.file.path is determined by the django filesystemstorage specified in models.py
|
# #Put a copy of the file in the right place. mugShotObj.file.path is determined by the django filesystemstorage specified in models.py
|
||||||
if not os.path.exists(dummyObj.file.path):
|
# if not os.path.exists(dummyObj.file.path):
|
||||||
shutil.copy(mugShotPath, dummyObj.file.path)
|
# shutil.copy(mugShotPath, dummyObj.file.path)
|
||||||
|
|
||||||
mugShotObj, created = save_carefully(
|
# mugShotObj, created = save_carefully(
|
||||||
models.DPhoto,
|
# models.DPhoto,
|
||||||
lookupAttribs={'is_mugshot':True, 'file':mugShotFilename},
|
# lookupAttribs={'is_mugshot':True, 'file':mugShotFilename},
|
||||||
nonLookupAttribs={'caption':"Mugshot for "+person.first_name+" "+person.last_name}
|
# nonLookupAttribs={'caption':"Mugshot for "+person.first_name+" "+person.last_name}
|
||||||
)
|
# )
|
||||||
|
|
||||||
if created:
|
# if created:
|
||||||
mugShotObj.contains_person.add(person)
|
# mugShotObj.contains_person.add(person)
|
||||||
mugShotObj.save()
|
# mugShotObj.save()
|
||||||
|
|
||||||
def parseMugShotAndBlurb(personline, header, person):
|
def parseMugShotAndBlurb(personline, header, person):
|
||||||
"""create mugshot Photo instance"""
|
"""create mugshot Photo instance"""
|
||||||
mugShotFilename=personline[header["Mugshot"]]
|
mugShotFilename=personline[header["Mugshot"]]
|
||||||
mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
|
mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
|
||||||
if mugShotPath[-3:]=='jpg': #if person just has an image, add it
|
if mugShotPath[-3:]=='jpg': #if person just has an image, add it
|
||||||
saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
|
#saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
|
||||||
|
pass
|
||||||
elif mugShotPath[-3:]=='htm': #if person has an html page, find the image(s) and add it. Also, add the text from the html page to the "blurb" field in his model instance.
|
elif mugShotPath[-3:]=='htm': #if person has an html page, find the image(s) and add it. Also, add the text from the html page to the "blurb" field in his model instance.
|
||||||
personPageOld=open(mugShotPath,'r').read()
|
personPageOld=open(mugShotPath,'r').read()
|
||||||
if not person.blurb:
|
if not person.blurb:
|
||||||
@ -45,9 +46,9 @@ def parseMugShotAndBlurb(personline, header, person):
|
|||||||
person.blurb=re.search('<body>.*<hr',personPageOld,re.DOTALL).group()
|
person.blurb=re.search('<body>.*<hr',personPageOld,re.DOTALL).group()
|
||||||
else:
|
else:
|
||||||
print "ERROR: --------------- Broken link or Blurb parse error in ", mugShotFilename
|
print "ERROR: --------------- Broken link or Blurb parse error in ", mugShotFilename
|
||||||
for mugShotFilename in re.findall('i/.*?jpg',personPageOld,re.DOTALL):
|
#for mugShotFilename in re.findall('i/.*?jpg',personPageOld,re.DOTALL):
|
||||||
mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
|
# mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
|
||||||
saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
|
# saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
|
||||||
person.save()
|
person.save()
|
||||||
|
|
||||||
def LoadPersonsExpos():
|
def LoadPersonsExpos():
|
||||||
|
@ -27,7 +27,7 @@ pathsdict={
|
|||||||
"MEDIA_ADMIN_DIR" : MEDIA_ADMIN_DIR,
|
"MEDIA_ADMIN_DIR" : MEDIA_ADMIN_DIR,
|
||||||
"MEDIA_ROOT" : MEDIA_ROOT,
|
"MEDIA_ROOT" : MEDIA_ROOT,
|
||||||
"MEDIA_URL" : MEDIA_URL,
|
"MEDIA_URL" : MEDIA_URL,
|
||||||
"PHOTOS_ROOT" : PHOTOS_ROOT,
|
#"PHOTOS_ROOT" : PHOTOS_ROOT,
|
||||||
"PHOTOS_URL" : PHOTOS_URL,
|
"PHOTOS_URL" : PHOTOS_URL,
|
||||||
"PYTHON_PATH" : PYTHON_PATH,
|
"PYTHON_PATH" : PYTHON_PATH,
|
||||||
"REPOS_ROOT_PATH" : REPOS_ROOT_PATH,
|
"REPOS_ROOT_PATH" : REPOS_ROOT_PATH,
|
||||||
|
@ -44,7 +44,7 @@ NOTABLECAVESHREFS = [ "161", "204", "258", "76", "107", "264" ]
|
|||||||
# trailing slash.
|
# trailing slash.
|
||||||
# Examples: "http://foo.com/media/", "/media/".
|
# Examples: "http://foo.com/media/", "/media/".
|
||||||
ADMIN_MEDIA_PREFIX = '/troggle/media-admin/'
|
ADMIN_MEDIA_PREFIX = '/troggle/media-admin/'
|
||||||
PHOTOS_ROOT = os.path.join(EXPOWEB, 'photos')
|
#PHOTOS_ROOT = os.path.join(EXPOWEB, 'mugshot-data')
|
||||||
CAVEDESCRIPTIONS = os.path.join(EXPOWEB, "cave_data")
|
CAVEDESCRIPTIONS = os.path.join(EXPOWEB, "cave_data")
|
||||||
ENTRANCEDESCRIPTIONS = os.path.join(EXPOWEB, "entrance_data")
|
ENTRANCEDESCRIPTIONS = os.path.join(EXPOWEB, "entrance_data")
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<div id="col1">
|
<div id="col1">
|
||||||
<h3>Welcome</h3>
|
<h3>Welcome</h3>
|
||||||
<p class="indent">
|
<p class="indent">
|
||||||
This is Troggle, the information portal for Cambridge University Caving Club's Expeditions to Austria.
|
This is Troggle, the online system for Cambridge University Caving Club's Expeditions to Austria.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="indent">
|
<p class="indent">
|
||||||
@ -46,7 +46,7 @@ Here you will find information about the {{expedition.objects.count}} expedition
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="indent">
|
<p class="indent">
|
||||||
If you are an expedition member, please sign up using the link to the top right and begin editing.
|
If you are an expedition member, please sign up using the link to the top right.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
9
urls.py
9
urls.py
@ -48,7 +48,7 @@ actualurlpatterns = patterns('',
|
|||||||
url(r'^newfile', views_other.newFile, name="newFile"),
|
url(r'^newfile', views_other.newFile, name="newFile"),
|
||||||
|
|
||||||
url(r'^getEntrances/(?P<caveslug>.*)', views_caves.get_entrances, name = "get_entrances"),
|
url(r'^getEntrances/(?P<caveslug>.*)', views_caves.get_entrances, name = "get_entrances"),
|
||||||
url(r'^getQMs/(?P<caveslug>.*)', views_caves.get_qms, name = "get_qms"),
|
url(r'^getQMs/(?P<caveslug>.*)', views_caves.get_qms, name = "get_qms"), # no template "get_qms"?
|
||||||
url(r'^getPeople/(?P<expeditionslug>.*)', views_logbooks.get_people, name = "get_people"),
|
url(r'^getPeople/(?P<expeditionslug>.*)', views_logbooks.get_people, name = "get_people"),
|
||||||
url(r'^getLogBookEntries/(?P<expeditionslug>.*)', views_logbooks.get_logbook_entries, name = "get_logbook_entries"),
|
url(r'^getLogBookEntries/(?P<expeditionslug>.*)', views_logbooks.get_logbook_entries, name = "get_logbook_entries"),
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ actualurlpatterns = patterns('',
|
|||||||
url(r'^caveslug/([^/]+)/?$', views_caves.caveSlug, name="caveSlug"),
|
url(r'^caveslug/([^/]+)/?$', views_caves.caveSlug, name="caveSlug"),
|
||||||
url(r'^cave/entrance/([^/]+)/?$', views_caves.caveEntrance),
|
url(r'^cave/entrance/([^/]+)/?$', views_caves.caveEntrance),
|
||||||
url(r'^cave/description/([^/]+)/?$', views_caves.caveDescription),
|
url(r'^cave/description/([^/]+)/?$', views_caves.caveDescription),
|
||||||
url(r'^cave/qms/([^/]+)/?$', views_caves.caveQMs),
|
url(r'^cave/qms/([^/]+)/?$', views_caves.caveQMs), # blank page
|
||||||
url(r'^cave/logbook/([^/]+)/?$', views_caves.caveLogbook),
|
url(r'^cave/logbook/([^/]+)/?$', views_caves.caveLogbook),
|
||||||
url(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', views_caves.editEntrance, name = "editentrance"),
|
url(r'^entrance/(?P<caveslug>[^/]+)/(?P<slug>[^/]+)/edit/', views_caves.editEntrance, name = "editentrance"),
|
||||||
url(r'^entrance/new/(?P<caveslug>[^/]+)/', views_caves.editEntrance, name = "newentrance"),
|
url(r'^entrance/new/(?P<caveslug>[^/]+)/', views_caves.editEntrance, name = "newentrance"),
|
||||||
@ -87,6 +87,7 @@ actualurlpatterns = patterns('',
|
|||||||
url(r'^survey/?$', surveyindex, name="survey"),
|
url(r'^survey/?$', surveyindex, name="survey"),
|
||||||
url(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey, name="survey"),
|
url(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey, name="survey"),
|
||||||
|
|
||||||
|
# Is all this lot out of date ? Maybe the logbooks work?
|
||||||
url(r'^controlpanel/?$', views_other.controlPanel, name="controlpanel"),
|
url(r'^controlpanel/?$', views_other.controlPanel, name="controlpanel"),
|
||||||
url(r'^CAVETAB2\.CSV/?$', views_other.downloadCavetab, name="downloadcavetab"),
|
url(r'^CAVETAB2\.CSV/?$', views_other.downloadCavetab, name="downloadcavetab"),
|
||||||
url(r'^Surveys\.csv/?$', views_other.downloadSurveys, name="downloadsurveys"),
|
url(r'^Surveys\.csv/?$', views_other.downloadSurveys, name="downloadsurveys"),
|
||||||
@ -147,8 +148,8 @@ actualurlpatterns = patterns('',
|
|||||||
|
|
||||||
#url(r'^tunneldatainfo/(?P<path>.+?\.xml)$', view_surveys.tunnelfileinfo, name="tunnelfileinfo"),
|
#url(r'^tunneldatainfo/(?P<path>.+?\.xml)$', view_surveys.tunnelfileinfo, name="tunnelfileinfo"),
|
||||||
|
|
||||||
(r'^photos/(?P<path>.*)$', 'django.views.static.serve',
|
#(r'^photos/(?P<path>.*)$', 'django.views.static.serve',
|
||||||
{'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
|
#{'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
|
||||||
|
|
||||||
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
|
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user