I'm sorry to ask what I feel must be a simple question, but I've just
spent the last hour trawling through the documentation, and can't for
the life for me find out how to add a "delete button" to a form.
I've set up a generic view:
(r'^quote/delete/(?P<object_id>\d+)/$',
'django.views.generic.create_update.delete_object', dict(quote_info,
post_delete_redirect='/sam/')),
Which I've tested and seems to be working ok. (The documentation, by
the way, didn't mention anything about requiring
foo_confirm_delete.html but I guess that's not too hard to figure out
from the error message)
The thing is, I want to work out how to add a delete button to my:
(r'^quote/(?P<object_id>\d+)/$',
'django.views.generic.create_update.update_object', dict(quote_info,
post_save_redirect='/sam/')),
Now I understand that I must edit the template to make this happen.
The thing is, and to give you some insight on the challenges for a
noob to web development, I'm never sure when I should be using django/
python and when I need to use good old fashioned HTML.
I could I suppose fairly easily stick a link on the template that
redirects to my generic delete URL. However, one of my aims with this
project is to try to do everything as intelligently as possible, so I
wonder if there is any way I can include django save and add another/
delete/cancel widgets onto the form automatically?
I'll eventually be wanting to put those "edit in line" green cross
buttons onto foreign key input fields too, so I'm thinking django must
have a standard sort of widget set to allow this?
Cheers,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---