Commits

Benjamin Guidarelli committed 58bc51f

added a members only thing to the stoat views

Comments (0)

Files changed (1)

 from django.shortcuts import get_object_or_404, render_to_response
 from django.template import RequestContext
 from django.views.decorators.csrf import csrf_protect
-from django.contrib.auth.decorators import login_required
+from django.contrib.auth.decorators import login_required, user_passes_test
+
+from members.views import _is_active_member
 
 
 from forms import MovePageForm
     }, context_instance=RequestContext(request))
 
 @login_required
+@user_passes_test(_is_active_member)
 def render_members_only(request, p):
     return render_to_response(get_path(p.template), {
         'page':p,