summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorexpo <expo@expobox.potato.hut>2011-09-02 03:39:20 +0200
committerexpo <expo@expobox.potato.hut>2011-09-02 03:39:20 +0200
commit378ddfe96d4a9497be7f00aade1b0ef1cb3d01d3 (patch)
treeed5d2156f5374d7705b2f163508962f8c012aa6b /core
parent4def1aece2eb713c90ea3cec027c40458f20c8ed (diff)
parent2145d1187ee401ba0b768a8383b06aef866bdbce (diff)
downloadtroggle-378ddfe96d4a9497be7f00aade1b0ef1cb3d01d3.tar.gz
troggle-378ddfe96d4a9497be7f00aade1b0ef1cb3d01d3.tar.bz2
troggle-378ddfe96d4a9497be7f00aade1b0ef1cb3d01d3.zip
branch merge
Diffstat (limited to 'core')
-rw-r--r--core/views_caves.py12
-rw-r--r--core/views_logbooks.py2
2 files changed, 7 insertions, 7 deletions
diff --git a/core/views_caves.py b/core/views_caves.py
index 4a79652..9fcf9b4 100644
--- a/core/views_caves.py
+++ b/core/views_caves.py
@@ -30,39 +30,39 @@ def caveindex(request):
def cave(request, cave_id='', offical_name=''):
cave=getCave(cave_id)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave, 'cavepage': True})
else:
return render_with_context(request,'cave.html', {'cave': cave, 'cavepage': True})
def caveEntrance(request, slug):
cave = Cave.objects.get(slug = slug)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave})
else:
return render_with_context(request,'cave_entrances.html', {'cave': cave})
def caveDescription(request, slug):
cave = Cave.objects.get(slug = slug)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave})
else:
return render_with_context(request,'cave_uground_description.html', {'cave': cave})
def caveQMs(request, slug):
cave = Cave.objects.get(slug = slug)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave})
else:
return render_with_context(request,'cave_qms.html', {'cave': cave})
def caveLogbook(request, slug):
cave = Cave.objects.get(slug = slug)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave})
else:
return render_with_context(request,'cave_logbook.html', {'cave': cave})
def caveSlug(request, slug):
cave = Cave.objects.get(slug = slug)
- if cave.non_public and not request.user.is_authenticated():
+ if cave.non_public and settings.PUBLIC_SITE and not request.user.is_authenticated():
return render_with_context(request,'nonpublic.html', {'instance': cave})
else:
return render_with_context(request,'cave.html', {'cave': cave})
diff --git a/core/views_logbooks.py b/core/views_logbooks.py
index 2cf9163..0aee9c6 100644
--- a/core/views_logbooks.py
+++ b/core/views_logbooks.py
@@ -5,7 +5,7 @@ import troggle.settings as settings
import django.db.models
from troggle.parsers.logbooks import LoadLogbookForExpedition
from troggle.parsers.people import GetPersonExpeditionNameLookup
-#from troggle.core.forms import PersonForm, getTripForm, get_name
+from troggle.core.forms import getTripForm#, get_name, PersonForm
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.template import Context, loader