settings.PUBLIC_SITE, login required if public for logbook entry, CRCF middleware

This commit is contained in:
Martin Green 2011-05-02 02:12:26 +01:00
parent d49271ddcf
commit f178fff0b9
6 changed files with 12 additions and 3 deletions

View File

@ -16,6 +16,8 @@ SURVEY_SCANS = '/home/expo/expoimages/'
FILES = '/home/expo/expoimages'
EXPOWEB_URL = 'http://expo.survex.com/'
PUBLIC_SITE = True
SURVEYS_URL = 'http://troggle.cavingexpedition.com/survey_scans/'
SVX_URL = 'http://framos.lawoftheland.co.uk/troggle/survex/'

View File

@ -13,6 +13,8 @@ SURVEYS = '/home/goatchurch/tunnel/cucc/surveys'
EXPOWEB_URL = 'http://expo.survex.com/'
PUBLIC_SITE = False
CAVERN = 'cavern'
EXPOWEB = '/home/goatchurch/expoweb/'
SURVEYS_URL = ''

View File

@ -18,6 +18,7 @@ LOGFILE = EXPOWEB+'troggle\\parsing_log.txt'
PHOTOS = 'C:\\Expo\\expoweb\\photos'
URL_ROOT = 'http://127.0.0.1:8000'
PUBLIC_SITE = False
TINY_MCE_MEDIA_ROOT = '/usr/share/tinymce/www/'
TINY_MCE_MEDIA_URL = URL_ROOT + 'tinymce_media/'

View File

@ -63,6 +63,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'troggle.middleware.SmartAppendSlashMiddleware'
)

View File

@ -5,7 +5,9 @@
{% block editLink %}<a href={{logbookentry.get_admin_url}}>Edit logbook entry {{logbookentry|wiki_to_html_short}}</a>{% endblock %}
{% block content %}
<h2>{{logbookentry.title|safe}}</h2>
{% block related %}{% endblock %}
{% block nav %}{% endblock %}
<h2>{{logbookentry.title}}</h2>
<div id="related">
<p><a href="{{ logbookentry.expedition.get_absolute_url }}">{{logbookentry.expedition.name}}</a></p>
@ -69,6 +71,7 @@
</div>
</div>
{% if logbookentry.filename %}<a href="{% url editlogbookentry year=logbookentry.year pdate=logbookentry.date pslug=logbookentry.slug %}">Edit</a> <a href="{% url deletelogbookentry year=logbookentry.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 %}

View File

@ -6,7 +6,7 @@
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<form method="post" action=".">
<form method="post" action=".">{% csrf_token %}
<table>
<tr><td>{{ form.username.label_tag }}</td><td>{{ form.username }}</td></tr>
<tr><td>{{ form.password.label_tag }}</td><td>{{ form.password }}</td></tr>