mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
Upgrade to django 1.5, some functions have been changed
url in templates now requires quotes roung the first arg USE_TZ added
This commit is contained in:
parent
242cf4741a
commit
ffb5d7bdda
@ -19,7 +19,7 @@ class SmartAppendSlashMiddleware(object):
|
||||
"""
|
||||
|
||||
# Check for a redirect based on settings.SMART_APPEND_SLASH
|
||||
host = http.get_host(request)
|
||||
host = http.HttpRequest.get_host(request)
|
||||
old_url = [host, request.path]
|
||||
new_url = old_url[:]
|
||||
# Append a slash if SMART_APPEND_SLASH is set and the resulting URL
|
||||
|
@ -11,7 +11,7 @@ from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.views.generic.list_detail import object_list
|
||||
from django.views.generic.list import ListView
|
||||
from django import forms
|
||||
|
||||
from core.models import Person
|
||||
|
@ -18,6 +18,7 @@ MANAGERS = ADMINS
|
||||
# although not all choices may be available on all operating systems.
|
||||
# If running in a Windows environment this must be set to the same as your
|
||||
# system time zone.
|
||||
USE_TZ = True
|
||||
TIME_ZONE = 'Europe/London'
|
||||
|
||||
# Language code for this installation. All choices can be found here:
|
||||
|
@ -22,9 +22,9 @@
|
||||
{% if user.username %}
|
||||
You are logged in as {{ user.username }}
|
||||
{% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>)
|
||||
{% else %}<a href={% url profiles_select_profile %}>sort your profile</a>
|
||||
{% else %}<a href={% url "profiles_select_profile" %}>sort your profile</a>
|
||||
{% endif %}.
|
||||
| <a href="{% url auth_logout %}">Log out</a> {% else %} <a href="{% url registration_register %}">Sign up</a> | <a href="{% url auth_login %}">Log in</a> {% endif %}
|
||||
| <a href="{% url "auth_logout" %}">Log out</a> {% else %} <a href="{% url "registration_register" %}">Sign up</a> | <a href="{% url "auth_login" %}">Log in</a> {% endif %}
|
||||
{% endblock%}
|
||||
{% block editLink %}
|
||||
|
||||
@ -32,17 +32,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbarlinks">
|
||||
<a href="{% url survexcaveslist %}">All Survex</a> |
|
||||
<a href="{% url surveyscansfolders %}">Scans</a> |
|
||||
<a href="{% url tunneldata %}">Tunneldata</a> |
|
||||
<a href="{% url survexcavessingle 107 %}">107</a> |
|
||||
<a href="{% url survexcavessingle 161 %}">161</a> |
|
||||
<a href="{% url survexcavessingle 204 %}">204</a> |
|
||||
<a href="{% url survexcavessingle 258 %}">258</a> |
|
||||
<a href="{% url survexcavessingle 264 %}">264</a> |
|
||||
<a href="{% url expedition 2014 %}">Expo2014</a> |
|
||||
<a href="{% url expedition 2015 %}">Expo2015</a> |
|
||||
<a href="{% url expedition 2016 %}">Expo2016</a> |
|
||||
<a href="{% url "survexcaveslist" %}">All Survex</a> |
|
||||
<a href="{% url "surveyscansfolders" %}">Scans</a> |
|
||||
<a href="{% url "tunneldata" %}">Tunneldata</a> |
|
||||
<a href="{% url "survexcavessingle" 107 %}">107</a> |
|
||||
<a href="{% url "survexcavessingle" 161 %}">161</a> |
|
||||
<a href="{% url "survexcavessingle" 204 %}">204</a> |
|
||||
<a href="{% url "survexcavessingle" 258 %}">258</a> |
|
||||
<a href="{% url "survexcavessingle" 264 %}">264</a> |
|
||||
<a href="{% url "expedition" 2014 %}">Expo2014</a> |
|
||||
<a href="{% url "expedition" 2015 %}">Expo2015</a> |
|
||||
<a href="{% url "expedition" 2016 %}">Expo2016</a> |
|
||||
|
||||
<a href="/admin/">Django admin</a>
|
||||
</div>
|
||||
@ -85,24 +85,24 @@
|
||||
<li><a id="expoWebsiteLink" href="http://expo.survex.com">Expedition website</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="{% url frontpage %}">Troggle front page</a></li>
|
||||
<li><a id="cavesLink" href="{% url caveindex %}">caves</a></li>
|
||||
<li><a id="caversLink" href="{% url personindex %}">cavers</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="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>
|
||||
<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="#">diversions</a>
|
||||
<ul class="sub_menu">
|
||||
<li><a href="{% url stats %}">statistics</a></li>
|
||||
<li><a href="{% url "stats" %}">statistics</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#">admin</a>
|
||||
<ul class="sub_menu">
|
||||
<li><a id="cuccLink" href="{% url controlpanel %}">Import / export data</a></li>
|
||||
<li><a id="cuccLink" href="{% url "controlpanel" %}">Import / export data</a></li>
|
||||
<li><a id="expoWebsiteLink" href="{{ settings.URL_ROOT }}admin">Troggle administration pages</a></li>
|
||||
</ul>
|
||||
<li class="toggleMenu"><a href="#">hide menu</a></li>
|
||||
|
@ -36,7 +36,7 @@
|
||||
{{ ent.entrance_letter|safe }}
|
||||
{% if ent.entrance.name %}
|
||||
{{ ent.entrance.name|safe }}
|
||||
{% endif %}<a href="{% url editentrance cave.slug ent.entrance.slug %}">Edit</a>
|
||||
{% endif %}<a href="{% url "editentrance" cave.slug ent.entrance.slug %}">Edit</a>
|
||||
<dl>
|
||||
{% if ent.entrance.marking %}
|
||||
<dt>Marking</dt><dd>{{ ent.entrance.marking_val|safe }}</dd>
|
||||
@ -96,7 +96,7 @@
|
||||
</ul>
|
||||
|
||||
{% endif %}</p>
|
||||
<a href="{% url newentrance cave.slug %}">New Entrance</a>
|
||||
<a href="{% url "newentrance" cave.slug %}">New Entrance</a>
|
||||
</div>
|
||||
|
||||
<div id="Description">
|
||||
|
@ -7,7 +7,7 @@
|
||||
{{ ent.entrance_letter|safe }}
|
||||
{% if ent.entrance.name %}
|
||||
{{ ent.entrance.name|safe }}
|
||||
{% endif %}<a href="{% url editentrance cave.slug ent.entrance.slug %}">Edit</a>
|
||||
{% endif %}<a href="{% url "editentrance" cave.slug ent.entrance.slug %}">Edit</a>
|
||||
<dl>
|
||||
{% if ent.entrance.marking %}
|
||||
<dt>Marking</dt><dd>{{ ent.entrance.marking_val|safe }}</dd>
|
||||
@ -67,5 +67,5 @@
|
||||
</ul>
|
||||
|
||||
{% endif %}</p>
|
||||
<a href="{% url newentrance cave.slug %}">New Entrance</a>
|
||||
<a href="{% url "newentrance" cave.slug %}">New Entrance</a>
|
||||
</div>
|
||||
|
@ -34,6 +34,6 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<a href="{% url newcave %}">New Cave</a>
|
||||
<a href="{% url "newcave" %}">New Cave</a>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -68,7 +68,7 @@
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form name="export" method="get" action="{% url downloadcavetab %}">
|
||||
<form name="export" method="get" action="{% url "downloadcavetab" %}">
|
||||
<p>Download a CAVETAB2.CSV file which is dynamically generated by Troggle.</p>
|
||||
<input name="download_cavetab" type="submit" value="Download CAVETAB2.CSV" />
|
||||
</form>
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<form name="export" method="get" action={% url downloadlogbook %}>
|
||||
<form name="export" method="get" action={% url "downloadlogbook" %}>
|
||||
<p>Download a logbook file which is dynamically generated by Troggle.</p>
|
||||
|
||||
<p>
|
||||
@ -120,7 +120,7 @@
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form name="export" method="get" action={% url downloadsurveys %}>
|
||||
<form name="export" method="get" action={% url "downloadsurveys" %}>
|
||||
<p>Download a Surveys.csv file which is dynamically generated by Troggle.</p>
|
||||
<input disabled name="download_surveys" type="submit" value="Download Surveys.csv" />
|
||||
</form>
|
||||
|
@ -6,16 +6,16 @@
|
||||
$(function() {
|
||||
$("#id_date").datepicker({dateFormat: "yy-mm-dd"});
|
||||
$("#id_cave").change(function() {
|
||||
$('#id_entrance').load('{% url get_entrances caveslug="" %}' + this.value);
|
||||
$('#id_entrance').load('{% url "get_entrances" caveslug="" %}' + this.value);
|
||||
});
|
||||
$("#id_cave").change(function() {
|
||||
$('#id_qm').load('{% url get_qms caveslug="" %}' + this.value);
|
||||
$('#id_qm').load('{% url "get_qms" caveslug="" %}' + this.value);
|
||||
});
|
||||
$("#id_expedition").change(function() {
|
||||
$('#id_logbookentry').load('{% url get_logbook_entries expeditionslug="" %}' + this.value);
|
||||
$('#id_logbookentry').load('{% url "get_logbook_entries" expeditionslug="" %}' + this.value);
|
||||
});
|
||||
$("#id_expedition").change(function() {
|
||||
$('#id_person').load('{% url get_people expeditionslug="" %}' + this.value);
|
||||
$('#id_person').load('{% url "get_people" expeditionslug="" %}' + this.value);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -51,7 +51,7 @@ an "S" for a survey trip. The colours are the same for people on the same trip.
|
||||
{% endfor %}
|
||||
<br/>
|
||||
{% for survexblock in persondayactivities.survexblocks %}
|
||||
<a href="{% url svx survexblock.survexfile.path %}" class="dayindexsurvex-{{survexblock.DayIndex}}">S</a>
|
||||
<a href="{% url "svx" survexblock.survexfile.path %}" class="dayindexsurvex-{{survexblock.DayIndex}}">S</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
{% else %}
|
||||
@ -67,7 +67,7 @@ an "S" for a survey trip. The colours are the same for people on the same trip.
|
||||
<form action="" method="GET"><input type="submit" name="reload" value="Reload"></form>
|
||||
|
||||
<h3>Logbooks and survey trips per day</h3>
|
||||
<a href="{% url newLogBookEntry expeditionyear=expedition.year %}">New logbook entry</a>
|
||||
<a href="{% url "newLogBookEntry" expeditionyear=expedition.year %}">New logbook entry</a>
|
||||
<table class="expeditionlogbooks">
|
||||
<tr><th>Date</th><th>Logged trips</th><th>Surveys</th></tr>
|
||||
{% regroup dateditems|dictsort:"date" by date as dates %}
|
||||
@ -78,7 +78,7 @@ an "S" for a survey trip. The colours are the same for people on the same trip.
|
||||
{% if item.isLogbookEntry %}<a href="{{ item.get_absolute_url }}">{{item.title|safe}}</a><br/>{% endif %}
|
||||
{% endfor %}</td>
|
||||
<td>{% for item in date.list %}
|
||||
{% if item.isSurvexBlock %}<a href="{% url svx item.survexfile.path %}">{{item.name}}</a><br/>{% endif %}
|
||||
{% if item.isSurvexBlock %}<a href="{% url "svx" item.survexfile.path %}">{{item.name}}</a><br/>{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -16,14 +16,14 @@
|
||||
<li><a href="/indxal.htm">Cave index</a></li>
|
||||
{% if cavepage %}
|
||||
<ul>
|
||||
<li><a href="{% url survexcaveslist %}">All Survex</a></li>
|
||||
<li><a href="{% url surveyscansfolders %}">Scans</a></li>
|
||||
<li><a href="{% url tunneldata %}">Tunneldata</a></li>
|
||||
<li><a href="{% url survexcavessingle 161 %}">161</a></li>
|
||||
<li><a href="{% url survexcavessingle 204 %}">204</a></li>
|
||||
<li><a href="{% url survexcavessingle 258 %}">258</a></li>
|
||||
<li><a href="{% url expedition 2012 %}">Expo2012</a></li>
|
||||
<li><a href="{% url expedition 2013 %}">Expo2013</a></li>
|
||||
<li><a href="{% url "survexcaveslist" %}">All Survex</a></li>
|
||||
<li><a href="{% url "surveyscansfolders" %}">Scans</a></li>
|
||||
<li><a href="{% url "tunneldata" %}">Tunneldata</a></li>
|
||||
<li><a href="{% url "survexcavessingle" 161 %}">161</a></li>
|
||||
<li><a href="{% url "survexcavessingle" 204 %}">204</a></li>
|
||||
<li><a href="{% url "survexcavessingle" 258 %}">258</a></li>
|
||||
<li><a href="{% url "expedition" 2012 %}">Expo2012</a></li>
|
||||
<li><a href="{% url "expedition" 2013 %}">Expo2013</a></li>
|
||||
<li><a href="/admin">Django admin</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
@ -3,5 +3,5 @@
|
||||
{% block bodyattrs %}{% if homepage %} id="homepage"{% endif %}{% endblock %}
|
||||
{% block body %}
|
||||
{{ body|safe }}
|
||||
{% if homepage %}{% if editable %}<a href="{% url editflatpage path %}">Edit</a>{% endif %}{%else %}{% include "menu.html" %}{% endif %}
|
||||
{% if homepage %}{% if editable %}<a href="{% url "editflatpage" path %}">Edit</a>{% endif %}{%else %}{% include "menu.html" %}{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -57,7 +57,7 @@ Everyone is gearing up for the 2009 expedition; please see the link below for th
|
||||
|
||||
<h3>Troggle development</h3>
|
||||
<p class="indent">
|
||||
Troggle is still under development. Check out the <a href="http://troggle.googlecode.com">development page</a> on google code, where you can file bug reports, make suggestions, and help develop the code. There is also an old todo list at <a href="{%url todo%}">here</a>.
|
||||
Troggle is still under development. Check out the <a href="http://troggle.googlecode.com">development page</a> on google code, where you can file bug reports, make suggestions, and help develop the code. There is also an old todo list at <a href="{%url "todo"%}">here</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -8,14 +8,14 @@
|
||||
<h2>The unfinished front page</h2>
|
||||
<ul>
|
||||
<li><b>About {{totallogbookentries}} logbook entries have been loaded</b></li>
|
||||
<li><b><a href="{% url personindex %}">List of People</a></b></li>
|
||||
<li><b><a href="{% url caveindex %}">List of Caves</a></b></li>
|
||||
<li><a href="{% url jgtfile aaaa %}">JGT list of files</a> (temporary simple file list and tunnel use)</li>
|
||||
<li><a href="{% url survey %}">Survey files</a></li>
|
||||
<li><a href="{% url svx all %}">Survex directory</a></li>
|
||||
<li><a href="{% url expedition 2008 %}">Expedition 2008</a></li>
|
||||
<li><a href="{% url expedition 2007 %}">Expedition 2007</a></li>
|
||||
<li><a href="{% url expedition 1992 %}">Expedition 1992</a> (earliest parsed)</li>
|
||||
<li><b><a href="{% url "personindex" %}">List of People</a></b></li>
|
||||
<li><b><a href="{% url "caveindex" %}">List of Caves</a></b></li>
|
||||
<li><a href="{% url "jgtfile" aaaa %}">JGT list of files</a> (temporary simple file list and tunnel use)</li>
|
||||
<li><a href="{% url "survey" %}">Survey files</a></li>
|
||||
<li><a href="{% url "svx" all %}">Survex directory</a></li>
|
||||
<li><a href="{% url "expedition" 2008 %}">Expedition 2008</a></li>
|
||||
<li><a href="{% url "expedition" 2007 %}">Expedition 2007</a></li>
|
||||
<li><a href="{% url "expedition" 1992 %}">Expedition 1992</a> (earliest parsed)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Further work</h2>
|
||||
@ -50,7 +50,7 @@
|
||||
<ul id="expeditionlist">
|
||||
{% for expedition in expeditions %}
|
||||
<li>
|
||||
<a href="{% url expedition expedition.year %}">{{expedition.name}}</a>
|
||||
<a href="{% url "expedition" expedition.year %}">{{expedition.name}}</a>
|
||||
- <b>{{expedition.logbookentry_set.count}}</b> logbook entries
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -3,20 +3,20 @@
|
||||
<h3>Files</h3>
|
||||
<ul>
|
||||
{% for lf in listdirfiles %}
|
||||
<li><a href="{% url jgtfile lf.0 %}">{{lf.1}}</a> ({{lf.2}} bytes)</li>
|
||||
<li><a href="{% url "jgtfile" lf.0 %}">{{lf.1}}</a> ({{lf.2}} bytes)</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h3>Upperdirectories</h3>
|
||||
<ul>
|
||||
{% for lf in upperdirs %}
|
||||
<li><a href="{% url jgtfile lf.0 %}">{{lf.1}}</a></li>
|
||||
<li><a href="{% url "jgtfile" lf.0 %}">{{lf.1}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h3>Subdirectories</h3>
|
||||
<ul>
|
||||
{% for lf in listdirdirs %}
|
||||
<li><a href="{% url jgtfile lf.0 %}">{{lf.1}}</a> ({{lf.2}} files)</li>
|
||||
<li><a href="{% url "jgtfile" lf.0 %}">{{lf.1}}</a> ({{lf.2}} files)</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -71,7 +71,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if logbookentry.filename %}<a href="{% url editLogBookEntry expeditionyear=logbookentry.expedition.year pdate=logbookentry.date pslug=logbookentry.slug %}">Edit</a> <a href="{% url deleteLogBookEntry expeditionyear=logbookentry.expedition.year date=logbookentry.date slug=logbookentry.slug %}">Delete</a>{%endif%}
|
||||
{% if logbookentry.filename %}<a href="{% url "editLogBookEntry" expeditionyear=logbookentry.expedition.year pdate=logbookentry.date pslug=logbookentry.slug %}">Edit</a> <a href="{% url "deleteLogBookEntry" expeditionyear=logbookentry.expedition.year date=logbookentry.date slug=logbookentry.slug %}">Delete</a>{%endif%}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<li><a href="/indxal.htm">Caves</a></li>
|
||||
<li><a href="/handbook/index.htm">Handbook</a></li>
|
||||
<li><a href="/pubs.htm">Reports</a></li>
|
||||
{% if editable %}<li><a href="{% url editflatpage path %}" class="editlink"><strong>Edit this page</strong></a></li>{% endif %}
|
||||
{% if cave_editable %}<li><a href="{% url edit_cave cave_editable %}" class="editlink"><strong>Edit this cave</strong></a></li>{% endif %}
|
||||
{% if editable %}<li><a href="{% url "editflatpage" path %}" class="editlink"><strong>Edit this page</strong></a></li>{% endif %}
|
||||
{% if cave_editable %}<li><a href="{% url "edit_cave" cave_editable %}" class="editlink"><strong>Edit this cave</strong></a></li>{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
@ -2,6 +2,6 @@
|
||||
{% block title %}Page not found {{ path }}{% endblock %}
|
||||
{% block body %}
|
||||
<h1>Page not found {{ path }}</h1>
|
||||
<a href="{%url editflatpage path %}">Create this page.</a>
|
||||
<a href="{%url "editflatpage" path %}">Create this page.</a>
|
||||
{% include "menu.html" %}
|
||||
{% endblock %}
|
||||
|
@ -39,7 +39,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if persondate.2 %}
|
||||
<td class="survexblock"><a href="{% url svx persondate.2.survexfile.path %}">{{persondate.2}}</a></td>
|
||||
<td class="survexblock"><a href="{% url "svx" persondate.2.survexfile.path %}">{{persondate.2}}</a></td>
|
||||
<td class="roles">
|
||||
{% for survexpersonrole in persondate.2.survexpersonrole_set.all %}
|
||||
{{survexpersonrole.nrole}}
|
||||
|
@ -12,11 +12,11 @@ New troggle account registered
|
||||
|
||||
{% if account %}
|
||||
<p>
|
||||
Hello, {{ account }}! Your account is now activated. Now you can <a href="{%url auth_login%}">log in</a> with the password you chose. Use the links in the upper right to control this in the future.
|
||||
Hello, {{ account }}! Your account is now activated. Now you can <a href="{%url "auth_login"%}">log in</a> with the password you chose. Use the links in the upper right to control this in the future.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have been on the expedition in the past, you already have a profile in the system; <a href={% url profiles_select_profile %}>click here </a> to find it and link it to your account. Otherwise, please <a href={% url profiles_create_profile %}> create yourself a new profile</a>.
|
||||
If you have been on the expedition in the past, you already have a profile in the system; <a href={% url "profiles_select_profile" %}>click here </a> to find it and link it to your account. Otherwise, please <a href={% url "profiles_create_profile" %}> create yourself a new profile</a>.
|
||||
</p>
|
||||
{% else %}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<P>Glad you're joining the CUCC EXPO team! Please go to</P>
|
||||
|
||||
<P><a href="{{ site }}{% url registration_activate activation_key %}">{{ site }}{% url registration_activate activation_key %}</a></P>
|
||||
<P><a href="{{ site }}{% url "registration_activate" activation_key %}">{{ site }}{% url "registration_activate" activation_key %}</a></P>
|
||||
|
||||
<P>to activate your account. Do this within {{ expiration_days }} days, or else you'll have to sign up again.</P>
|
||||
|
||||
|
@ -2,7 +2,7 @@ Hello {{ form.user }},
|
||||
|
||||
Glad you're joining the CUCC EXPO team! Please go to
|
||||
|
||||
{{ site }}{% url registration_activate activation_key %}
|
||||
{{ site }}{% url "registration_activate" activation_key %}
|
||||
|
||||
to activate your account. Do this within {{ expiration_days }} days, or else you'll have to sign up again.
|
||||
|
||||
|
@ -9,7 +9,7 @@ registration_form.html | {{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{% url registration_register %}" method="POST">{% csrf_token %}
|
||||
<form action="{% url "registration_register" %}" method="POST">{% csrf_token %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<span style="color:red">{{ error }}</span>
|
||||
{% endfor %}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{% block content %}
|
||||
<h2>Survex Block {{survexblock.survexpath}}</h2>
|
||||
|
||||
<p>Link to <a href="{% url svx survexblock.survexfile.path %}">{{survexblock.survexfile.path}}</a></p>
|
||||
<p>Link to <a href="{% url "svx" survexblock.survexfile.path %}">{{survexblock.survexfile.path}}</a></p>
|
||||
|
||||
<p>Needs duplicates removed from right hand column</p>
|
||||
<p>Needs links to survex file presentation</p>
|
||||
@ -18,13 +18,13 @@
|
||||
|
||||
{% if survexblock.parent %}
|
||||
<p>Survey block above:</p>
|
||||
<p class="indent"><a href="{% url survexblock survexblock.parent.survexpath %}">{{survexblock.parent.survexpath}}</a></p>
|
||||
<p class="indent"><a href="{% url "survexblock" survexblock.parent.survexpath %}">{{survexblock.parent.survexpath}}</a></p>
|
||||
{% endif %}
|
||||
|
||||
{% if survexblock.survexblock_set.all %}
|
||||
<p>Survey blocks below:</p>
|
||||
{% for survexblockdown in survexblock.survexblock_set.all %}
|
||||
<p class="indent"><a href="{% url survexblock survexblockdown.survexpath %}">{{survexblockdown.survexpath}}</a></p>
|
||||
<p class="indent"><a href="{% url "survexblock" survexblockdown.survexpath %}">{{survexblockdown.survexpath}}</a></p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
<table>
|
||||
{% for survexblock in survexscansfolder.survexblock_set.all %}
|
||||
<tr>
|
||||
<td><a href="{% url svx survexblock.survexfile.path %}">{{survexblock}}</a></td>
|
||||
<td><a href="{% url "svx" survexblock.survexfile.path %}">{{survexblock}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<td>{{survexscansfolder.survexscansingle_set.all|length}}</td>
|
||||
<td>
|
||||
{% for survexblock in survexscansfolder.survexblock_set.all %}
|
||||
<a href="{% url svx survexblock.survexfile.path %}">{{survexblock}}</a>
|
||||
<a href="{% url "svx" survexblock.survexfile.path %}">{{survexblock}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -24,11 +24,11 @@
|
||||
});
|
||||
|
||||
function redirectSurvey(){
|
||||
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23" + document.getElementById("surveyChooser").value;
|
||||
window.location = "{% url "survey" %}" + '/' + document.getElementById("expeditionChooser").value + "%23" + document.getElementById("surveyChooser").value;
|
||||
}
|
||||
|
||||
function redirectYear(){
|
||||
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23";
|
||||
window.location = "{% url "survey" %}" + '/' + document.getElementById("expeditionChooser").value + "%23";
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -29,9 +29,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% ifequal survexfile survexdirectory.primarysurvexfile %}
|
||||
<a href="{% url svx survexfile.path %}"><b>{{survexfile.path}}</b></a>
|
||||
<a href="{% url "svx" survexfile.path %}"><b>{{survexfile.path}}</b></a>
|
||||
{% else %}
|
||||
<a href="{% url svx survexfile.path %}">{{survexfile.path}}</a>
|
||||
<a href="{% url "svx" survexfile.path %}">{{survexfile.path}}</a>
|
||||
{% endifequal %}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -62,7 +62,7 @@ $(document).ready(function()
|
||||
|
||||
{% if logmessage %}
|
||||
{% if has_3d %}
|
||||
<p><a href="{% url threed title %}">3d file</a></p>
|
||||
<p><a href="{% url "threed" title %}">3d file</a></p>
|
||||
{% else %}
|
||||
<p><b>No 3d file</b></p>
|
||||
{% endif %}
|
||||
|
@ -12,23 +12,23 @@
|
||||
<h2 id="cdir">Caves with subdirectories</h2>
|
||||
|
||||
{% for subdircave, cavefiles, subsurvdirs in subdircaves %}
|
||||
<h3>{{cavefiles.0.1}} - <a href="{% url survexcavessingle cavefiles.0.1 %}">dates and explorers</a></h3>
|
||||
<h3>{{cavefiles.0.1}} - <a href="{% url "survexcavessingle" cavefiles.0.1 %}">dates and explorers</a></h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td><b><a href="{% url svx cavefiles.0.0 %}">{{cavefiles.0.1}}</a></b></td>
|
||||
<td><b><a href="{% url "svx" cavefiles.0.0 %}">{{cavefiles.0.1}}</a></b></td>
|
||||
<td>
|
||||
{% for cavepath, cavename in cavefiles.1 %}
|
||||
<a href="{% url svx cavepath %}">{{cavename}}</a>
|
||||
<a href="{% url "svx" cavepath %}">{{cavename}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% for primarycavefile, subcavefiles in subsurvdirs %}
|
||||
<tr>
|
||||
<td><a href="{% url svx primarycavefile.0 %}">{{primarycavefile.1}}</a></td>
|
||||
<td><a href="{% url "svx" primarycavefile.0 %}">{{primarycavefile.1}}</a></td>
|
||||
<td>
|
||||
{% for cavepath, cavename in subcavefiles %}
|
||||
<a href="{% url svx cavepath %}">{{cavename}}</a>
|
||||
<a href="{% url "svx" cavepath %}">{{cavename}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -44,12 +44,12 @@
|
||||
{% for primarycavefile, subcavefiles in multifilecaves %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url survexcavessingle primarycavefile.1 %}">{{primarycavefile.1}}</a>
|
||||
<a href="{% url "survexcavessingle" primarycavefile.1 %}">{{primarycavefile.1}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url svx primarycavefile.0 %}">{{primarycavefile.1}}</a> -
|
||||
<a href="{% url "svx" primarycavefile.0 %}">{{primarycavefile.1}}</a> -
|
||||
{% for cavepath, cavename in subcavefiles %}
|
||||
<a href="{% url svx cavepath %}">{{cavename}}</a>
|
||||
<a href="{% url "svx" cavepath %}">{{cavename}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -59,7 +59,7 @@
|
||||
<h2 id="csing">Caves of one file</h2>
|
||||
<p>
|
||||
{% for cavepath, cavename in onefilecaves %}
|
||||
<a href="{% url svx cavepath %}">{{cavename}}</a>
|
||||
<a href="{% url "svx" cavepath %}">{{cavename}}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% if logmessage %}
|
||||
{% if has_3d %}
|
||||
<p><a href="{% url threed title %}">3d file</a></p>
|
||||
<p><a href="{% url "threed" title %}">3d file</a></p>
|
||||
{% else %}
|
||||
<p><b>No 3d file</b></p>
|
||||
{% endif %}
|
||||
|
@ -8,14 +8,14 @@
|
||||
<h2>The unfinished front page</h2>
|
||||
<ul>
|
||||
<li><b>About {{totallogbookentries}} logbook entries have been loaded</b></li>
|
||||
<li><b><a href="{% url personindex %}">List of People</a></b></li>
|
||||
<li><b><a href="{% url caveindex %}">List of Caves</a></b></li>
|
||||
<li><a href="{% url jgtfile aaaa %}">JGT list of files</a> (temporary simple file list and tunnel use)</li>
|
||||
<li><a href="{% url survey %}">Survey files</a></li>
|
||||
<li><a href="{% url survexindex all %}">Survex directory</a></li>
|
||||
<li><a href="{% url expedition 2008 %}">Expedition 2008</a></li>
|
||||
<li><a href="{% url expedition 2007 %}">Expedition 2007</a></li>
|
||||
<li><a href="{% url expedition 1993 %}">Expedition 1993</a> (earliest parsed)</li>
|
||||
<li><b><a href="{% url "personindex" %}">List of People</a></b></li>
|
||||
<li><b><a href="{% url "caveindex" %}">List of Caves</a></b></li>
|
||||
<li><a href="{% url "jgtfile" aaaa %}">JGT list of files</a> (temporary simple file list and tunnel use)</li>
|
||||
<li><a href="{% url "survey" %}">Survey files</a></li>
|
||||
<li><a href="{% url "survexindex" all %}">Survex directory</a></li>
|
||||
<li><a href="{% url "expedition" 2008 %}">Expedition 2008</a></li>
|
||||
<li><a href="{% url "expedition" 2007 %}">Expedition 2007</a></li>
|
||||
<li><a href="{% url "expedition" 1993 %}">Expedition 1993</a> (earliest parsed)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Further work</h2>
|
||||
@ -52,7 +52,7 @@
|
||||
<ul id="expeditionlist">
|
||||
{% for expedition in expeditions %}
|
||||
<li>
|
||||
<a href="{% url expedition expedition.year %}">{{expedition.name}}</a>
|
||||
<a href="{% url "expedition" expedition.year %}">{{expedition.name}}</a>
|
||||
- <b>{{expedition.logbookentry_set.count}}</b> logbook entries
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<tr><th>File</th><th>Font</th><th>SurvexBlocks</th><th>Size</th><th>Paths</th><th>Scans folder</th><th>Scan files</th><th>Frames</th></tr>
|
||||
{% for tunnelfile in tunnelfiles %}
|
||||
<tr>
|
||||
<td><a href="{% url tunnelfile tunnelfile.tunnelpath %}">{{tunnelfile.tunnelpath}}</a></td>
|
||||
<td><a href="{% url "tunnelfile" tunnelfile.tunnelpath %}">{{tunnelfile.tunnelpath}}</a></td>
|
||||
<td>{{tunnelfile.bfontcolours}}</td>
|
||||
<td></td>
|
||||
<td>{{tunnelfile.filesize}}</td>
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
<td>
|
||||
{% for rtunnelfile in tunnelfile.tunnelcontains.all %}
|
||||
<a href="{% url tunnelfile rtunnelfile.tunnelpath %}">{{rtunnelfile.tunnelpath}}</a>
|
||||
<a href="{% url "tunnelfile" rtunnelfile.tunnelpath %}">{{rtunnelfile.tunnelpath}}</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
|
||||
|
6
urls.py
6
urls.py
@ -6,9 +6,9 @@ from core.views_other import *
|
||||
from core.views_caves import *
|
||||
from core.views_survex import *
|
||||
from core.models import *
|
||||
from django.views.generic.create_update import create_object
|
||||
from django.views.generic.edit import UpdateView
|
||||
from django.contrib import admin
|
||||
from django.views.generic.list_detail import object_list
|
||||
from django.views.generic.list import ListView
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
@ -30,7 +30,7 @@ actualurlpatterns = patterns('',
|
||||
#url(r'^person/(\w+_\w+)$', views_logbooks.person, name="person"),
|
||||
|
||||
url(r'^expedition/(\d+)$', views_logbooks.expedition, name="expedition"),
|
||||
url(r'^expeditions/?$', object_list, {'queryset':Expedition.objects.all(),'template_name':'object_list.html'},name="expeditions"),
|
||||
url(r'^expeditions/?$', ListView, {'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'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"),
|
||||
url(r'^newlogbookentry/(?P<expeditionyear>.*)$', views_logbooks.newLogbookEntry, name="newLogBookEntry"),
|
||||
|
Loading…
Reference in New Issue
Block a user