Yes, Alberto is right.

Also, I ran into this problem a few days ago. Basically, after you
write your view processing like Alberto suggested, you need to do a
response redirect or HttpResponseRedirect and pass it "." (which is to
the same page the user was on). After I did that on my form, the user
gets sent back to the same page and the "." eliminates concatenating
another useradd string to the end of your url.

Have fun.

On Jun 27, 1:19 pm, Alberto Piai <[EMAIL PROTECTED]> wrote:
> Hello,
>
> On Jun 27, 10:55 am, AnaReis <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I'm having a problem here and I don't really know how to solve it.
> > I have a form on a page, the add user page:
> > (r'^manager/operations/nlsciadc/users/adduser/$', add_user),  #The
> > template is add_user.html
>
> > When the user presses submit, the action on the form sends the user
> > to:
> > <form name="form1" id="form1" action="resultadd/"  method="POST">
>
> the best practice is to use the same view to display (GET request) and
> process (POST request) the form. This is shown 
> here:http://www.djangoproject.com/documentation/newforms/#simple-view-example
>
> This way you redisplay the same page when the form is not valid, and
> redirect to another page upon successful form submission.
>
> If something is not clear, feel free to ask again.
>
> Bye,
>
> Alberto


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to