Thursday, June 25, 2015

Model cache problem

Hi!

I have a form with a choice field. I fill it from a model let's name it
Apples. And when I delete a row from Apples model the choice field
includes the deleted Apple after page reloading. I use this Apple choice
form another page and on that page there's the deleted Apple row too.
When I choose the deleted row the application throw a DoesNotExist
exception (very well). I try it debug mode and when I restart the app it
will be ok. The deleted apple row not in the choice filed. And of course
the deleted row not in the sql anymore. So the deletion is successfull.

How can I refresh the choice filed, or regenerate the model after row
deletion?

dragon

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/558C101D.4030905%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment