def waiting_list(request): if request.method == "POST": form = WaitingListForm(request.POST) if form.is_valid(): form.save() messages.success(request, "I'll contact you as soon as space is available") return redirect("home") else: form = WaitingListForm() return TemplateResponse(request, "waiting-list.html", {"form": form})
def home2(request): if request.method == 'POST': waiting = WaitingListForm(request.POST) if waiting.is_valid(): item = waiting.save() item.save() message = "Thanks. We'll let you know when the new game starts!" else: message = "That's not a valid email address" blog_date, blog_title, blog_content = _parseFeed() this_year = getThisYear() return locals()
def home(request): if request.method == 'POST': waiting = WaitingListForm(request.POST) if waiting.is_valid(): item = waiting.save() item.save() message = "Thanks. We'll let you know when the new game starts!" else: message = "That's not a valid email address" blog_date, blog_title, blog_content = _parseFeed() this_year = getThisYear() predictions = Prediction.objects.filter(year=this_year) predictions = predictions.order_by('-score', '-goaldiff', 'created_date') predictions = predictions.all()[:10] return locals()