I'm using generic view create_update.update_object to edit items
selected from a generic list_detail.object_list. Edits to items work
very well, they hit the database as soon as I submit the form in my
html template. I know because I inspect the mysql table directly. So
far so good.

One of my fields is a "Done" checkbox. The queryset used by my
list_detail.object_list is generated by a overriding get_query_set in a
Manager in my model which contains custom sql that filters out records
which are marked "Done". However, after submitting the form and getting
"post_save_direct"ed back to the list, Django does not refresh the list
by dropping the updated "Done" field. That is, I want the queryset to
match the database and the record I just marked "Done" should drop off
the list, but it doesn't. Refreshing the browser doesn't do anything.

So there seems to be some sort of caching going on. I haven't set up
caching in this project. I have learned by experimenting that
restarting the Django server, or even saving the model file, causes my
custom sql to refresh the queryset, becuase the html form suddenly
"Knows" about the database change, and drops the "done" row upon
browser refresh.

What do I need to do to keep the queryset sync'd with the database?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to