def add_event(request): account=get_current_user() profile=get_current_profile() if request.method =='POST': form=EventBasicsForm(request.POST) if form.is_valid(): form.save() if profile.userlevel < 9: mail.send_mail(sender="Events bot ANGRY <*****@*****.**>", to="The Laziest Louts Ever <*****@*****.**>", #to="The Laziest Louts Ever <*****@*****.**>", subject="New Series Created, now get off your ass!", body=""" New Event! Need Review: http://events.datacommunitydc.org/events/queue/ The Angry Server. """) messages.add_message(request, messages.INFO, "Thanks for submitting an event! It's in <a href='events/queue/'>the queue</a> and will be reviewed soon") else: messages.add_message(request, messages.INFO, "Thanks! Once we review, it will be posted to main page!") request.site.expire_assets() #return redirect(reverse('front-page')) return render_to_response('events/add_success.html', locals(), context_instance=RequestContext(request)) else: form=EventBasicsForm() return render_to_response('events/add.html', locals(), context_instance=RequestContext(request))
def add_event(request): account=get_current_user() profile=get_current_profile() if request.method =='POST': form=EventBasicsForm(request.POST) if form.is_valid(): form.save() if profile.userlevel < 9: messages.add_message(request, messages.INFO, "Thanks for submitting an event! It's in <a href='events/queue/'>the queue</a> and will be reviewed soon") else: messages.add_message(request, messages.INFO, "Event, added.") request.site.expire_assets() return redirect(reverse('front-page')) else: form=EventBasicsForm() return render_to_response('events/add.html', locals(), context_instance=RequestContext(request))
def add_event(request): account = get_current_user() profile = get_current_profile() if request.method == 'POST': form = EventBasicsForm(request.POST) if form.is_valid(): form.save() if profile.userlevel < 9: messages.add_message( request, messages.INFO, "Thanks for submitting an event! It's in <a href='events/queue/'>the queue</a> and will be reviewed soon" ) else: messages.add_message(request, messages.INFO, "Event, added.") request.site.expire_assets() return redirect(reverse('front-page')) else: form = EventBasicsForm() return render_to_response('events/add.html', locals(), context_instance=RequestContext(request))
def add_event(request): account = get_current_user() profile = get_current_profile() if request.method == 'POST': form = EventBasicsForm(request.POST) if form.is_valid(): form.save() if profile.userlevel < 9: mail.send_mail( sender="Events bot ANGRY <*****@*****.**>", to="The Laziest Louts Ever <*****@*****.**>", #to="The Laziest Louts Ever <*****@*****.**>", subject="New Series Created, now get off your ass!", body=""" New Event! Need Review: http://events.datacommunitydc.org/events/queue/ The Angry Server. """) messages.add_message( request, messages.INFO, "Thanks for submitting an event! It's in <a href='events/queue/'>the queue</a> and will be reviewed soon" ) else: messages.add_message( request, messages.INFO, "Thanks! Once we review, it will be posted to main page!") request.site.expire_assets() #return redirect(reverse('front-page')) return render_to_response('events/add_success.html', locals(), context_instance=RequestContext(request)) else: form = EventBasicsForm() return render_to_response('events/add.html', locals(), context_instance=RequestContext(request))