DG, what you describe is the AJAX approach. I'd use jQuery to help with this sort of thing. use jQuery.post() you would have to define a url to handle the post request and a view function to pass it to. from the view function, you could return an HttpResponse() with the confirmation bit of html or a failure string. then in the callback function of the jQuery.post(), you could take the returned data and display it however you wanted.
-John On Mar 24, 9:18 pm, Django Grappelli <django.grappe...@gmail.com> wrote: > Put another way, how do execute a django function that simply does something > with the data in my database? It seems that views are the only way to do > this but perhaps I'm missing something. > > Thanks in advance for all the help. > > Best, > DG > > On Wed, Mar 24, 2010 at 6:26 PM, Django Grappelli < > > > > django.grappe...@gmail.com> wrote: > > Hi Guys, > > Thanks for your help. I was thinking of taking an AJAX approach, but > > wondered if there were a simpler way. Basically, I'd like to have the user > > click, e.g. a delete button. It would delete the selected record and > > display a small confirmation popup but I don't want to redirect to another > > page. Also, I don't want to have to define a new url for delete function. > > DG > > > On Wed, Mar 24, 2010 at 3:49 AM, Omer Barlas <omer.bar...@gmail.com>wrote: > > >> Daniel Roseman @ 24-03-2010 11:43: > > >> But what do you mean, 'without changing the HTML'? In order to run a > >>> view, the user must make a page request. That will result in new data > > >> I guess he is talking about AJAX. > > >> -- > >> Omer Barlas > >> omer.bar...@gmail.com > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Django users" group. > >> To post to this group, send email to django-us...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@google > >> groups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.