On Sat, Jun 27, 2009 at 8:34 PM, Daniele Procida <dani...@apple-juice.co.uk>wrote:
> > I've encountered a problem with apps that disappear from Django's view. > It's happened to several of them, and has happened again just now after > I managed to get them back. > > I was testing an app called 'research' - it appeared in the admin, and I > was able to open both models there. > > Then I added the line: > > from research.models import Project > > to another app, and got the error at <http://dpaste.com/60602/>> > > I ran ./manage.py reset research people in the shell, and was told: > > Error: App with label research could not be found. Are you sure your > INSTALLED_APPS setting is correct? > > A few moments before, syncdb said it synced: > > [ other apps] > > news > > addresses > > people > > research > > newapp > > and now: > > [ other apps] > > addresses > > newapp > > After removing the line: > > from research.models import Project > > syncdb sees all the apps again; with it in, several disappear. > > What could be happening here? > > Daniele > > > > > Your issue is that you have a circular import: A imports B and B imports A. To get around this see: http://docs.djangoproject.com/en/dev/ref/models/fields/#lazy-relationships Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---