On Sat, 2007-04-07 at 12:58 +0000, ladamiak wrote: > Hi everyone... > > I'm having an strange behavior with a form. > > It's a simple sign-up form. > > When I call the page using the url http://xxx/membro/cadastro/3/ the > form show the data for de mebro.id=3, so after that, if I call the > page using the url http://xxx/membro/cadastro/ the form should not > show any data, but it does. It shows the data of the membro.id=3, no > matter what... > > It's not a browser cache problem because I called > http://xxx/membro/cadastro/3/ > on Firefox and http://xxx/membro/cadastro/ on IE and the IE form > showed the data too..
It certainly isn't obvious to my eyes what is going wrong here. All I can suggest is really trimming your example. Comment out every line except the line that should be executed when id=None. Make sure that returns the "no data" form. If not, you know where to start investigating. Maybe even go more minimal: just return the template with an empty context to check it appears (it will look broken, but at least you know the right method is being run, etc). Secondly, uncomment the conditional around "if id=None" and check to see if it behaves correctly or if the behaviour changes. Throughout all this leave all the stuff under "if request.method == post" commented out (in fact, don't even do that test). After verifying that each step works (hopefully). Slowly put back more and more bits until it fails. That should give you some clues about where the problem lies. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---