def email_ignore_add(request): if request.method == "POST": form = EmailIgnoreForm(request.POST) if form.is_valid(): ignore = form.save() return HttpResponseRedirect(reverse("helpdesk_email_ignore")) else: form = EmailIgnoreForm(request.GET) return render_to_response("helpdesk/email_ignore_add.html", RequestContext(request, {"form": form}))
def email_ignore_add(request): if request.method == 'POST': form = EmailIgnoreForm(request.POST) if form.is_valid(): ignore = form.save() return HttpResponseRedirect(reverse('helpdesk_email_ignore')) else: form = EmailIgnoreForm(request.GET) return render_to_response('helpdesk/email_ignore_add.html', RequestContext(request, { 'form': form, }))