def commit(request): if request.method == "POST": ef = EmailForm(request.POST) if ef.is_valid(): s = Signup(email=ef.cleaned_data["email"]) s.save() cats = ["volunteer", "outdoors", "food", "drink", "entertain", "winter", "rents"] resp_dict = models.get_acts_from_cats(cats) return render_to_response("home.html", resp_dict, RequestContext(request)) else: ef = EmailForm() return render_to_response("commit.html", {"form": ef}, RequestContext(request))
def home(request): cats = ["volunteer", "outdoors", "food", "drink", "entertain", "winter", "rents", "club"] resp_dict = models.get_acts_from_cats(cats) return render_to_response("home.html", resp_dict, RequestContext(request))