summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Green <martin.speleo@gmail.com>2011-08-08 08:51:12 +0100
committerMartin Green <martin.speleo@gmail.com>2011-08-08 08:51:12 +0100
commitd8fe39ae86989d99da3e66ef88dc754e56139d2d (patch)
tree8a42045ab82762ee03520fa312b032b1b75bb5c7
parent5f5359f93373145f035fefd884c401732e3dd63b (diff)
downloadtroggle-d8fe39ae86989d99da3e66ef88dc754e56139d2d.tar.gz
troggle-d8fe39ae86989d99da3e66ef88dc754e56139d2d.tar.bz2
troggle-d8fe39ae86989d99da3e66ef88dc754e56139d2d.zip
Allow the viewing of noinfo caves on non public website without login
-rw-r--r--core/views_caves.py12
1 files changed, 6 insertions, 6 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})