On Mon, Aug 19, 2013 at 8:18 PM, Steven Smith <ste...@stevenlsmith.com> wrote:
> I've got a simple form with one field that appears in the footer of my site,
> asking users to enter their email address to subscribe to our mailing list.
>
> Rather than duplicate the form-processing logic in every single view, what
> should I do?
> - POST to one location, but use a context processor to add the form in GET
> contexts?
> - Add a decorator to every view that does the form logic
> - Some other third option?
>
> What do people typically do in this type of situation?

A form with one field that appears on every single page? I'd choose
option 3, POST to one location, write out the form by hand in your
master template.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to