How are you pulling the data from the database in the desktop app - using pure SQL or using the ORM?
If using the ORM it is possible it to cache the results of the database so you can run: mymodel.objects.update() This should clear the cache. -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: http://ilian.i-n-i.org On Tue, Sep 13, 2011 at 9:00 AM, puppriss <but...@gmail.com> wrote: > Greetings All, > > Now, you may think me a bit of an asshat for doing it this way, but.... > > I have a MySQL db backend, DJANGO admin, and a self-coded desktop > application ('InsectApp') written in Python. The 2 apps, DJANGO-Admin & > InsectApp, both use the same 'settings' file and access the same data (I > coded InsectApp so it would use the DJANGO database API because I thought it > would make life easier!). > > The problem: is that there are now 2 ways of entering data, one via either > app. For example, I'm in InsectApp and have imported model 'species' > (InsectApp.models.speices) - meanwhile I add a new 'species' record via the > Admin. On returning to InsectApp, I cannot access the new record unless I > exit and restart the app. I have tried reloading InsectApp.models but it > doesn't work. > > I'm assuming it's something to do with caching the data on first import of > model 'species', but I have no CACHES in my settings.py. In any case both > apps use the same settings.py. > > Can anyone explain and/or help me? Is there even a way of doing it? > Thanks in advance > > p.s. I need the Admin site because we need certain database info, eg > species taxonomy, to be updated remotely by taxonomists. The InsectApp is > for rapid entering of large amounts of data wihtin our local network, which > would be too clunky using the Admin alone. Hence the 2 apps > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/eSnLEH5uZBkJ. > 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. > -- 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.