def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) subscription = form.save() return HttpResponseRedirect(reverse('subscription:success', args=[ subscription.pk ]))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {"form": form}) return render_to_response("subscription/new.html", context) subscription = form.save() send_subscription_email(subscription) return HttpResponseRedirect(reverse("subscription:success", args=[subscription.pk]))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) subscription = form.save() send_subscription_email(subscription) return HttpResponseRedirect( reverse('subscription:success', args=[subscription.pk]))
def subscription(request): inscricao = True form = SubscriptionForm() if request.method == "POST": form = SubscriptionForm(request.POST) if not form.is_valid(): return render_to_response("subscription/form.html", {"form":form, "inscricao":inscricao}, context_instance=RequestContext(request)) get_form = form.save() return redirect("subscription:subs_success", id=get_form.pk) else: return render_to_response("subscription/form.html", {"form":form, "inscricao":inscricao}, context_instance=RequestContext(request))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) subscription = form.save() send_mail( subject = u'Inscrição no Eventex', message = u'Obrigado por se inscrever', from_email = '*****@*****.**', recipient_list = [ '*****@*****.**'], ) return HttpResponseRedirect(reverse('subscription:success', args=[ subscription.pk]))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) subscription = form.save() send_mail( subject=u'Inscrição no Eventex', message=u'Obrigado por se inscrever', from_email='*****@*****.**', recipient_list=['*****@*****.**'], ) return HttpResponseRedirect( reverse('subscription:success', args=[subscription.pk]))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) # model = Subscription(form) subscription = form.save() send_mail( subject = u'Inscricao no EventeX', message = u'Obrigado por se inscrever no EventeX!', from_email = '*****@*****.**', recipient_list = [ subscription.email ], ) return HttpResponseRedirect(reverse('subscription:success', args=[ subscription.pk ]))
def create(request): form = SubscriptionForm(request.POST) if not form.is_valid(): context = RequestContext(request, {'form': form}) return render_to_response('subscription/new.html', context) subscription = form.save() # enviando e-mail send_mail( subject = u'Inscrição no EventeX', message = u'Obrigado por se inscrever no EventeX!', from_email = '*****@*****.**', recipient_list = [ '*****@*****.**' ], ) return HttpResponseRedirect(reverse('subscription:success', args=[ subscription.pk ]))