On Sun, 2009-01-18 at 10:21 +0800, shreyas k wrote:
> Hi ,
> 
> I have  pasted the code here , when i try to edit it always enters the
> else condition. delete works fine
> Please assist.

There's a lot of code here and much of it isn't indented correctly (for
example, there's a "try:" statement that isn't followed by an indented
block), so it's hard to be sure what might be the problem. Try trimming
away as much as possible to reduce things to the smallest possible
example.

One obvious guess here, though, is that you are only checking for the
GET method. If you're submitting a form that is going to delete
something, it would hopefully be done using the POST method. So
delete_id won't be in request.GET. It will be in request.POST and should
be handled by the branch of your code that is handling request.method
being equal to "POST". This is only a guess, though, since I don't know
how you are submitting data from the form to this view or what data the
form contains.

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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to