2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00
This commit is contained in:
substantialnoninfringinguser 2009-05-19 06:32:42 +01:00
parent d71078d03d
commit 2c2f11be39
17 changed files with 149 additions and 95 deletions

View File

@ -1,4 +1,5 @@
from django.conf import settings from django.conf import settings
from expo.models import Expedition
def settings_context(request): def troggle_context(request):
return { 'settings':settings } return { 'settings':settings, 'Expedition':Expedition }

View File

@ -21,7 +21,7 @@ class TroggleModel(models.Model):
return self._meta.object_name return self._meta.object_name
def get_admin_url(self): def get_admin_url(self):
return settings.URL_ROOT + "/admin/expo/" + self.object_name.lower() + "/" + str(self.pk) return settings.URL_ROOT + "/admin/expo/" + self.object_name().lower() + "/" + str(self.pk)
class Meta: class Meta:
abstract = True abstract = True

View File

@ -93,4 +93,3 @@ def survey(request,year,wallet_number):
elevationSketches=current_survey.scannedimage_set.filter(contents='elevation') elevationSketches=current_survey.scannedimage_set.filter(contents='elevation')
return render_response(request,'survey.html', locals()) return render_response(request,'survey.html', locals())

View File

@ -60,17 +60,20 @@ def calendar(request,year):
return render_response(request,'calendar.html', locals()) return render_response(request,'calendar.html', locals())
def controlPanel(request): def controlPanel(request):
message = "no test message" #reverse('personn', kwargs={"name":"hkjhjh"}) jobs_completed=[]
if request.method=='POST': if request.method=='POST':
if request.user.is_superuser: if request.user.is_superuser:
for item in request.POST: importlist=['import_people', 'import_cavetab', 'import_logbooks', 'import_surveys', 'import_QMs']
if item!='item': databaseReset.make_dirs()
for item in importlist:
if item in request.POST:
print "running"+ " databaseReset."+item+"()" print "running"+ " databaseReset."+item+"()"
exec "databaseReset."+item+"()" exec "databaseReset."+item+"()"
jobs_completed.append(item)
else: else:
return HttpResponseRedirect(reverse('auth_login')) return HttpResponseRedirect(reverse('auth_login'))
return render_response(request,'controlPanel.html', {'caves':Cave.objects.all()} ) return render_response(request,'controlPanel.html', {'caves':Cave.objects.all(),'jobs_completed':jobs_completed})
def downloadCavetab(request): def downloadCavetab(request):
from export import tocavetab from export import tocavetab
@ -98,4 +101,9 @@ def downloadQMs(request):
response = HttpResponse(mimetype='text/csv') response = HttpResponse(mimetype='text/csv')
response['Content-Disposition'] = 'attachment; filename=qm.csv' response['Content-Disposition'] = 'attachment; filename=qm.csv'
toqms.writeQmTable(response,cave) toqms.writeQmTable(response,cave)
return response return response
def ajax_test(request):
post_text = request.POST['post_data']
return HttpResponse("{'response_text': '"+post_text+" recieved.'}",
mimetype="application/json")

View File

@ -20,7 +20,7 @@ ul.dropdown li.hover a { color: black; background:gray;}
*/ */
ul.dropdown ul { width: 220px; visibility: hidden; position: absolute; bottom: 100%; left: 0px; margin-left:0px; padding-left: 0px; background:none} ul.dropdown ul { width: 220px; visibility: hidden; position: absolute; bottom: 100%; left: 0px; margin-left:0px; padding-left: 0px; background:none}
ul.dropdown ul li { font-weight: normal; color: black; background: none; border-bottom: 1px solid #ccc; float: none; padding:0px; margin:0px} ul.dropdown ul li { font-weight: normal; color: black; background: none; border-bottom: 1px solid #ccc; float: none; padding:0px; margin:0px}
ul.dropdown ul li:hover, ul.dropdown ul li a:hover { color:white;}
/* IE 6 & 7 Needs Inline Block */ /* IE 6 & 7 Needs Inline Block */
ul.dropdown ul li a { border-right: none; width: 100%; display: inline-block; color: black;} ul.dropdown ul li a { border-right: none; width: 100%; display: inline-block; color: black;}

View File

@ -199,24 +199,7 @@ a.redtext:link {
} }
.redtext
.menuBarItem {
font-variant: small-caps;
text-align: right;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin;
}
.menuBarItem : hover {
background: "rgb(125, 125, 125)";
}
.behind { .behind {
@ -327,9 +310,11 @@ h1 {
#footerLinks{ #footerLinks{
position:fixed; position:fixed;
bottom:0px; bottom:0px;
padding: 0; padding: 0px;
margin-left:130px; margin-left: 130px;
margin-right:130px; margin-right: 130px;
margin-bottom: 0px;
} }
/*.fadeIn { /*.fadeIn {

View File

@ -1,12 +1,37 @@
div#nav { div#nav {
position:fixed; position:fixed;
width: 12em; width: 12em;
background: rgb(153, 153, 153); background: none;
margin-top: 0px; margin-top: 0px;
margin-left: 120px; margin-left: 130px;
border-top: thin black solid; border-right: thin black solid;
border-left: thin black solid;
border-bottom: thin black solid;
border-top: none;
} }
div#content { div#content {
padding-left:240px; padding-left:240px;
}
.menuBarItem {
font-variant: small-caps;
text-align: right;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-width: thin;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin;
}
.menuBarItem:hover {
background:#333;
}
.menuBarItem.on {
background:#333;
color:#999;
} }

View File

@ -16,7 +16,7 @@ function setMaxHeight(group, target) {
} }
/*This is the jquery comment stuff */ /*This is the jquery stuff */
$(document).ready(function() { $(document).ready(function() {
$('.searchable li').quicksearch({ $('.searchable li').quicksearch({
@ -42,12 +42,13 @@ $(".toggleMenu").click(function () {
$(".toggleMenu").toggle(); $(".toggleMenu").toggle();
}); });
$(".nav").css('opacity','7')
$(".footer").hide(); $(".footer").hide();
$(".fadeIn").hide(); $(".fadeIn").hide();
setTimeout("$('.leftMargin.fadeIn').fadeIn(3000);",1000); setTimeout("$('.leftMargin.fadeIn').fadeIn(3000);",1000);
setTimeout("$('.rightMargin.fadeIn').fadeIn(3000);",2000); setTimeout("$('.rightMargin.fadeIn').fadeIn(3000);",2000);
$("a.closeDiv").click(function () {
$(this).parent().hide();
});
/*$("#footerLinks").hover( /*$("#footerLinks").hover(
function() {$(".footer").fadeIn("slow")}, function() {$(".footer").fadeIn("slow")},

View File

@ -34,7 +34,7 @@ def parseCaveQMs(cave,inputFile):
return return
qmPath = settings.EXPOWEB+inputFile qmPath = settings.EXPOWEB+inputFile
qmCSVContents = open(qmPath,'r') qmCSVContents = open(qmPath,'rU')
dialect=csv.Sniffer().sniff(qmCSVContents.read()) dialect=csv.Sniffer().sniff(qmCSVContents.read())
qmCSVContents.seek(0,0) qmCSVContents.seek(0,0)
qmReader = csv.reader(qmCSVContents,dialect=dialect) qmReader = csv.reader(qmCSVContents,dialect=dialect)

View File

@ -137,7 +137,7 @@ def html_to_wiki(text):
return out return out
def LoadCaveTab(logfile=None): def LoadCaveTab(logfile=None):
cavetab = open(os.path.join(settings.EXPOWEB, "noinfo", "CAVETAB2.CSV")) cavetab = open(os.path.join(settings.EXPOWEB, "noinfo", "CAVETAB2.CSV"),'rU')
caveReader = csv.reader(cavetab) caveReader = csv.reader(cavetab)
caveReader.next() # Strip out column headers caveReader.next() # Strip out column headers

View File

@ -25,18 +25,22 @@ def saveMugShot(mugShotPath, mugShotFilename, person):
mugShotFilename=mugShotFilename[2:] mugShotFilename=mugShotFilename[2:]
else: else:
mugShotFilename=mugShotFilename # just in case one doesn't mugShotFilename=mugShotFilename # just in case one doesn't
mugShotObj = models.Photo( dummyObj=models.Photo(file=mugShotFilename)
caption="Mugshot for "+person.first_name+" "+person.last_name,
is_mugshot=True, #Put a copy of the file in the right place. mugShotObj.file.path is determined by the django filesystemstorage specified in models.py
file=mugShotFilename, if not os.path.exists(dummyObj.file.path):
shutil.copy(mugShotPath, dummyObj.file.path)
mugShotObj, created = save_carefully(
models.Photo,
lookupAttribs={'is_mugshot':True, 'file':mugShotFilename},
nonLookupAttribs={'caption':"Mugshot for "+person.first_name+" "+person.last_name}
) )
shutil.copy(mugShotPath, mugShotObj.file.path) #Put a copy of the file in the right place. mugShotObj.file.path is determined by the django filesystemstorage specified in models.py if created:
mugShotObj.contains_person.add(person)
mugShotObj.save() mugShotObj.save()
mugShotObj.contains_person.add(person)
mugShotObj.save()
def parseMugShotAndBlurb(personline, header, person): def parseMugShotAndBlurb(personline, header, person):
#create mugshot Photo instance #create mugshot Photo instance
@ -46,10 +50,11 @@ def parseMugShotAndBlurb(personline, header, person):
saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person) saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
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()
person.blurb=re.search('<body>.*<hr',personPageOld,re.DOTALL).group() #this needs to be refined, take care of the HTML and make sure it doesn't match beyond the blurb if not person.blurb:
for mugShotFilename in re.findall('i/.*?jpg',personPageOld,re.DOTALL): person.blurb=re.search('<body>.*<hr',personPageOld,re.DOTALL).group() #this needs to be refined, take care of the HTML and make sure it doesn't match beyond the blurb
mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename) for mugShotFilename in re.findall('i/.*?jpg',personPageOld,re.DOTALL):
saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person) mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
saveMugShot(mugShotPath=mugShotPath, mugShotFilename=mugShotFilename, person=person)
person.save() person.save()
def LoadPersonsExpos(): def LoadPersonsExpos():
@ -61,18 +66,17 @@ def LoadPersonsExpos():
# make expeditions # make expeditions
print "Loading expeditions" print "Loading expeditions"
models.Expedition.objects.all().delete()
years = headers[5:] years = headers[5:]
for year in years: for year in years:
expedition = models.Expedition(year = year, name = "CUCC expo %s" % year) lookupAttribs = {'year':year}
expedition.save() nonLookupAttribs = {'name':"CUCC expo %s" % year}
save_carefully(models.Expedition, lookupAttribs, nonLookupAttribs)
# make persons # make persons
print "Loading personexpeditions" print "Loading personexpeditions"
models.Person.objects.all().delete()
models.PersonExpedition.objects.all().delete()
#expoers2008 = """Edvin Deadman,Kathryn Hopkins,Djuke Veldhuis,Becka Lawson,Julian Todd,Natalie Uomini,Aaron Curtis,Tony Rooke,Ollie Stevens,Frank Tully,Martin Jahnke,Mark Shinwell,Jess Stirrups,Nial Peters,Serena Povia,Olly Madge,Steve Jones,Pete Harley,Eeva Makiranta,Keith Curtis""".split(",") #expoers2008 = """Edvin Deadman,Kathryn Hopkins,Djuke Veldhuis,Becka Lawson,Julian Todd,Natalie Uomini,Aaron Curtis,Tony Rooke,Ollie Stevens,Frank Tully,Martin Jahnke,Mark Shinwell,Jess Stirrups,Nial Peters,Serena Povia,Olly Madge,Steve Jones,Pete Harley,Eeva Makiranta,Keith Curtis""".split(",")
#expomissing = set(expoers2008) #expomissing = set(expoers2008)
@ -84,7 +88,7 @@ def LoadPersonsExpos():
lookupAttribs={'first_name':mname.group(1), 'last_name':(mname.group(2) or "")} lookupAttribs={'first_name':mname.group(1), 'last_name':(mname.group(2) or "")}
nonLookupAttribs={'is_vfho':personline[header["VfHO member"]],} nonLookupAttribs={'is_vfho':personline[header["VfHO member"]],}
person, created = save_carefully(models.Person, lookupAttribs=lookupAttribs, nonLookupAttribs=nonLookupAttribs) person, created = save_carefully(models.Person, lookupAttribs, nonLookupAttribs)
parseMugShotAndBlurb(personline=personline, header=header, person=person) parseMugShotAndBlurb(personline=personline, header=header, person=person)
@ -92,8 +96,9 @@ def LoadPersonsExpos():
for year, attended in zip(headers, personline)[5:]: for year, attended in zip(headers, personline)[5:]:
expedition = models.Expedition.objects.get(year=year) expedition = models.Expedition.objects.get(year=year)
if attended == "1" or attended == "-1": if attended == "1" or attended == "-1":
personexpedition = models.PersonExpedition(person=person, expedition=expedition, nickname=nickname, is_guest=(personline[header["Guest"]] == "1")) lookupAttribs = {'person':person, 'expedition':expedition}
personexpedition.save() nonLookupAttribs = {'nickname':nickname, 'is_guest':(personline[header["Guest"]] == "1")}
save_carefully(models.PersonExpedition, lookupAttribs, nonLookupAttribs)
# this fills in those people for whom 2008 was their first expo # this fills in those people for whom 2008 was their first expo

View File

@ -115,7 +115,7 @@ def parseSurveyScans(year, logfile=None):
#print "Added scanned image at " + str(scanObj) #print "Added scanned image at " + str(scanObj)
if scanFormat=="png": if scanFormat=="png":
if isInterlacedPNG(os.path.join(settings.SURVEY_SCANS,file)): if isInterlacedPNG(os.path.join(settings.SURVEY_SCANS,file)):
print file + "is an interlaced PNG. No can do." print file + " is an interlaced PNG. No can do."
continue continue
scanObj.save() scanObj.save()

View File

@ -54,7 +54,7 @@ TEMPLATE_LOADERS = (
# 'django.template.loaders.eggs.load_template_source', # 'django.template.loaders.eggs.load_template_source',
) )
TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth", "expo.context.settings_context", ) TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth", "expo.context.troggle_context", )
LOGIN_REDIRECT_URL = '/' LOGIN_REDIRECT_URL = '/'

View File

@ -65,15 +65,25 @@ window.onload = contentHeight;
<li><a href="#">External links</a> <li><a href="#">External links</a>
<ul class="sub_menu"> <ul class="sub_menu">
<li><a id="cuccLink" href="http://cucc.survex.com">CUCC website</a></li> <li><a id="cuccLink" href="http://www.srcf.ucam.org/caving/wiki/Main_Page">CUCC website</a></li>
<li><a id="expoWebsiteLink" href="http://cucc.survex.com/expo">Expedition website</a></li> <li><a id="expoWebsiteLink" href="http://cucc.survex.com/expo">Expedition website</a></li>
</ul> </ul>
</li> </li>
<li><a href="{% url frontpage %}">Troggle front page</a></li> <li><a href="{% url frontpage %}">Troggle front page</a></li>
<li><a id="cavesLink" href="{% url caveindex %}">caves</a></li> <li><a id="cavesLink" href="{% url caveindex %}">caves</a></li>
<li><a id="caversLink" href="{% url personindex %}">cavers</a></li> <li><a id="caversLink" href="{% url personindex %}">cavers</a></li>
<li><a href="#">expeditions</a>
<ul class="sub_menu">
<li><a id="expeditionsLink" href="{{ Expedition.objects.latest.get_absolute_url }}">newest</a></li>
<li><a id="expeditionsLink" href="{% url expeditions %}">list all</a></li>
</ul>
</li>
<li><a id="surveyBinderLink" href="{% url survey %}">survey binder</a></li> <li><a id="surveyBinderLink" href="{% url survey %}">survey binder</a></li>
<li><a href="{% url stats %}">statistics</a></li> <li><a href="#">diversions</a>
<ul class="sub_menu">
<li><a href="{% url stats %}">statistics</a></li>
</ul>
</li>
<li><a href="{% url calendar 2008 %}">expedition calendar</a></li> <li><a href="{% url calendar 2008 %}">expedition calendar</a></li>
<li><a href="#">admin</a> <li><a href="#">admin</a>
<ul class="sub_menu"> <ul class="sub_menu">
@ -84,18 +94,5 @@ window.onload = contentHeight;
</ul> </ul>
<div class="toggleMenu" style="display:none; position:fixed; bottom:0; right:130px"><a href="#">Show menu</a></li> <div class="toggleMenu" style="display:none; position:fixed; bottom:0; right:130px"><a href="#">Show menu</a></li>
<!--
<a id="cuccLink" href="http://cucc.survex.com">CUCC website</a> |
<a id="expoWebsiteLink" href="http://cucc.survex.com/expo">Expedition website</a> |
External links |
<a href="{% url frontpage %}">Troggle front page</a> |
<a href="{% url caveindex %}">Caves</a> |
<a id="caversLink" href="{% url personindex %}">Cavers</a> |
<a id="surveyBinderLink" href="{% url survey %}"> Survey binder</a> |
<a href="{% url stats %}"> Statistics</a> |
<a href="{% url calendar 2008 %}">Expedition calendar</a>
</div>
-->
</body> </body>
</html> </html>

View File

@ -1,15 +1,30 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<form name="import" method="post" action="">
<h3>Dump:</h3>
{% if jobs_completed %}
<div style="border:thin black solid; width: 40%; color:#F00; margin-left:auto; margin-right:auto">
Just finished running:
<ul>
{% for job in jobs_completed %}
<li>{{ job }}</li>
{% endfor %}
</ul>
{% if settings.LOGFILE %}See the logfile at {{settings.LOGFILE.path}} for more information.{% endif %}
<a href="#" class="closeDiv">dismiss this message</a>
</div>
{% endif %}
<form name="reset" method="post" action="">
<h3>Wipe:</h3>
<table> <table>
<tr><td>Dump entire database and recreate tables: </td><td><input type="checkbox" name="dump_db" /></td></tr> <tr><td>Wipe entire database and recreate tables: </td><td><input type="checkbox" name="reset" /></td><td> <input type="submit" id="Import" value="I really want to delete all information in troggle, and accept all responsibility."></td></tr>
</table> </table>
</form>
<h3>Import (non-destructive):</h3> <h3>Import (non-destructive):</h3>
<form name="import" method="post" action="">
<table> <table>
<tr><td>caves from cavetab2.csv using parsers\cavetab.py</td><td> <input type="checkbox" class="parser" name="import_cavetab"/></td></tr> <tr><td>caves from cavetab2.csv using parsers\cavetab.py</td><td> <input type="checkbox" class="parser" name="import_cavetab"/></td></tr>
<tr><td>logbook entries using parsers\logbooks.py</td><td><input type="checkbox" name="import_logbooks"/></td></tr> <tr><td>logbook entries using parsers\logbooks.py</td><td><input type="checkbox" name="import_logbooks"/></td></tr>
@ -24,7 +39,7 @@
<p> <p>
<input type="submit" id="Import" value="Import"> <input type="submit" id="Import" value="Import">
<input type="submit" name="check_all_import" id="check_all_import" value="Check all"> <input type="submit" name="check_all_import" id="check_all_import" value="Check all" disabled >
</p> </p>
</form> </form>

View File

@ -11,8 +11,27 @@
blankColor = "rgb(153, 153, 153)" blankColor = "rgb(153, 153, 153)"
highlightedColor = "rgb(125, 125, 125)" highlightedColor = "rgb(125, 125, 125)"
chosenColor = "rgb(255, 255, 255)" chosenColor = "rgb(255, 255, 255)"
$(document).ready(function() {
$(".menuBarItem").click(function() {
$("#"+this.id+"Content").toggle();
if ($(this).hasClass('on')){
$(this).removeClass('on');}
else {
$(this).addClass('on');
}
});
});
function redirectSurvey(){
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23" + document.getElementById("surveyChooser").value;
}
function redirectYear(){
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23";
}
</script> </script>
{% endblock %} {% endblock %}
<div id="currentLocation"> <div id="currentLocation">
@ -45,7 +64,7 @@
<div> <div>
<!-- <h4>Click to toggle:</h4>--> <!-- <h4>Click to toggle:</h4>-->
<div id="progressTable" class="menuBarItem" > {% if current_expedition.survey_set.all %}&#10003;{% endif %} <div id="progressTable" class="menuBarItem"> {% if current_expedition.survey_set.all %}&#10003;{% endif %}
survey progress table </div> survey progress table </div>
</div> </div>
@ -70,16 +89,16 @@
</center> </center>
<!-- <h4>Click to toggle:</h4>--> <!-- <h4>Click to toggle:</h4>-->
<div id="surveyWalletNav"> <div id="surveyWalletNav">
<div id="notes" class="menuBarItem" > {% if notes %}&#10003;{% endif %} <div id="notes" class="menuBarItem" "> {% if notes %}&#10003;{% endif %}
scanned notes </div> scanned notes </div>
<div id="survexFile" class="menuBarItem" > {% if current_survey.survex_file %}&#10003;{% endif %} <div id="survexFile" class="menuBarItem" "> {% if current_survey.survex_file %}&#10003;{% endif %}
survex file </div> survex file </div>
<div id="printedCentreline" class="menuBarItem" > {% if current_survey.centreline_printed_on %}&#10003;{% endif %} <div id="printedCentreline" class="menuBarItem" "> {% if current_survey.centreline_printed_on %}&#10003;{% endif %}
printed centreline </div> printed centreline </div>
<div id="scannedPassageSketch" class="menuBarItem" > {% if planSketches %}&#10003;{% endif %} <div id="scannedPassageSketch" class="menuBarItem" "> {% if planSketches %}&#10003;{% endif %}
scanned passage sketch </div> scanned passage sketch </div>
<div id="tunnelXMLfile" class="menuBarItem" >tunnel xml file</div> <div id="tunnelXMLfile" class="menuBarItem" ">tunnel xml file</div>
<div id="mainSketchIntegration" class="menuBarItem" >add to main sketch</div> <div id="mainSketchIntegration" class="menuBarItem" ">add to main sketch</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
@ -141,7 +160,7 @@
</p> </p>
</div> </div>
{% endfor %} {% endfor %}
<div class="figure"> <a href="{{ settings.URL_ROOT }}admin/expo/scannedimage/add/" target="_blank"> <img src="{{ settings.URL_ROOT }}{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_addlink.gif" /> Add a new scanned notes page. </a> </div> <div class="figure"> <a href="{{ settings.URL_ROOT }}admin/expo/scannedimage/add/"> <img src="{{ settings.URL_ROOT }}{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_addlink.gif" /> Add a new scanned notes page. </a> </div>
</div> </div>
<br class="clearfloat" /> <br class="clearfloat" />
<div id="survexFileContent" class="behind"> survex file editor, keeping file in original structure <br /> <div id="survexFileContent" class="behind"> survex file editor, keeping file in original structure <br />

View File

@ -24,7 +24,7 @@ urlpatterns = patterns('',
#url(r'^person/(\w+_\w+)$', views_logbooks.person, name="person"), #url(r'^person/(\w+_\w+)$', views_logbooks.person, name="person"),
url(r'^expedition/(\d+)$', views_logbooks.expedition, name="expedition"), url(r'^expedition/(\d+)$', views_logbooks.expedition, name="expedition"),
url(r'^expeditions/?$', object_list, {'queryset':Expedition.objects.all(),'template_name':'expeditions.html'},name="expeditionlist"), url(r'^expeditions/?$', object_list, {'queryset':Expedition.objects.all(),'template_name':'object_list.html'},name="expeditions"),
url(r'^personexpedition/(?P<first_name>[A-Z]*[a-z]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-z]*)/(?P<year>\d+)/?$', views_logbooks.personexpedition, name="personexpedition"), url(r'^personexpedition/(?P<first_name>[A-Z]*[a-z]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-z]*)/(?P<year>\d+)/?$', views_logbooks.personexpedition, name="personexpedition"),
url(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"), url(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"),
@ -72,8 +72,7 @@ urlpatterns = patterns('',
(r'^accounts/', include('registration.urls')), (r'^accounts/', include('registration.urls')),
(r'^profiles/', include('profiles.urls')), (r'^profiles/', include('profiles.urls')),
# (r'^personform/(.*)$', personForm), # (r'^personform/(.*)$', personForm),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),