示例#1
0
def detail(event_id):
  try:
    event = Event.objects(id=event_id).first()
    if event != None:
      return render_template("events/detail.html", event=event, auth=is_authenticated())
  except:
    pass
  return render_template("error/404.html"), 404
示例#2
0
 def decorated(*args, **kwargs):
     if not is_authenticated():
         return render_template('error/403.html'), 403
     return f(*args, **kwargs)
示例#3
0
 def decorated(*args, **kwargs):
     if not is_authenticated():
         return redirect("/")
     return f(*args, **kwargs)
示例#4
0
def detail(member_id):
    try:
        member = Member.objects(id=member_id).first()
        if member != None:
            events = Event.objects(attendees__in=[member])
            return render_template("members/detail.html", member=member, events=events, auth=is_authenticated())
    except:
        pass
    return render_template("error/404.html"), 404
示例#5
0
 def decorated(*args, **kwargs):
     if not is_authenticated():
         return render_template('error/403.html'), 403
     return f(*args, **kwargs)
示例#6
0
 def decorated(*args, **kwargs):
     if not is_authenticated():
         return redirect("/")
     return f(*args, **kwargs)