-
Notifications
You must be signed in to change notification settings - Fork 0
Patterns for Web Development
gesellc edited this page Aug 25, 2016
·
6 revisions
-
Always redirect after a POST
-
Django Pattern: Processing POST Requests in the Same View as Renders the Form
This time we’ll use a slightly different approach, one that’s actually a very common pattern in Django, which is to use the same view to process POST requests as to render the form that they come from. Whilst this doesn’t fit the REST-ful URL model quite as well, it has the important advantage that the same URL can display a form, and display any errors encountered in processing the user’s input.