diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 06:34:50 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-10 06:34:50 +0100 |
commit | 484a17d49658fc7ad364de00cba58a53d729856f (patch) | |
tree | bc6b314c2a37d8d228316714f78632c264ec5f04 /expo/views_caves.py | |
parent | 1d421b2d7c0cd478d5c92a54660bd3d085d05b12 (diff) | |
download | troggle-484a17d49658fc7ad364de00cba58a53d729856f.tar.gz troggle-484a17d49658fc7ad364de00cba58a53d729856f.tar.bz2 troggle-484a17d49658fc7ad364de00cba58a53d729856f.zip |
[svn] * Added non-public field for protecting copyright info etc. Field is on all models but needs to be checked for in views. So far, only the cave view checks.
* Added the Person wiki syntax which looks like [[person:John Doe]]
Diffstat (limited to 'expo/views_caves.py')
-rw-r--r-- | expo/views_caves.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/expo/views_caves.py b/expo/views_caves.py index 10355d6..b2fb170 100644 --- a/expo/views_caves.py +++ b/expo/views_caves.py @@ -24,7 +24,11 @@ def caveindex(request): return render_response(request,'caveindex.html', {'caves': caves, 'notablecaves':notablecaves})
def cave(request, cave_id='', offical_name=''):
- return render_response(request,'cave.html', {'cave': getCave(cave_id),})
+ cave=getCave(cave_id)
+ if cave.non_public:
+ return render_response(request,'nonpublic.html', {'instance': cave})
+ else:
+ return render_response(request,'cave.html', {'cave': cave})
def qm(request,cave_id,qm_id,year,grade=None):
year=int(year)
|