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
def decorated(*args, **kwargs): if not is_authenticated(): return render_template('error/403.html'), 403 return f(*args, **kwargs)
def decorated(*args, **kwargs): if not is_authenticated(): return redirect("/") return f(*args, **kwargs)
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