Hello,

I have a model which has a ForeignKey to itself. I'm doing this to
represent a hierarchy which I then need to display in the
corresponding select field of my form.

I've come up with a simple custom Form which represents my select
choices like this:
---------
level0.a
level0.a > level1.a
level0.a > level1.b
level0.b

etc.

You can find the corresponding code snippet here:
http://dpaste.com/hold/41342/

It's all working well but I seem to have some sort of cache or class
lifespan problem... the thing is that whenever I add a new item it
does not get displayed in the select choices next time I visit the
form. I need to reload the page a bunch of times for it to show up.

So, what do I need to do to avoid this behaviour?

Thank you all very much in advance,
NicoEchániz


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