On Fri, Apr 4, 2008 at 11:46 AM, AJ <[EMAIL PROTECTED]> wrote: > > So I have a manager for an model that executes some custom sql. That > custom sql on a certain page populates a select dropdown. For an > example we'll say that the select is a list of colors, and there is > also a page to add new colors. If I add a new color then go to the > page that has the list of colors in the select the color I just added > doesn't appear. It doesn't matter how many times I reload the page. > I need to manually restart the server and then the new color shows up > in the dropdown. I went into the manager that creates the custom sql > and print out the sql. I see it gets printed out the first time it is > used, but every other time after that it isn't printed until I restart > the server. Therefore any new data from this query won't show up > until the server is restarted. > > Any ideas why this query isn't run every time it is requested? >
Because you've specified it in some code that is only executed when the manager is defined (import time), not each time the manager is called. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---