The full error (last on in the stack) is
File "/home//venv/lib/python3.3/site-packages/django/db/models/fields/related.py", line 1699, in get_default
if isinstance(field_default, self.rel.to):
TypeError: isinstance() arg 2 must be a type or tuple of types
Python 3.3.2, Django 1.7b1
If I switch to 1.7b4, the error changes to
File "/home/s/Pycharm/flf/venv/lib/python3.3/site-packages/django/db/migrations/state.py", line 86, in render
model=lookup_model,
ValueError: Lookup failed for model referenced by field study.Card.image: studyimages.StudyImage
The error occurs when I create a FK field to a model in another app:
study/models.py:
....
image = models.ForeignKey('studyimages.StudyImage', default=None, blank=True, null=True, related_name='cardpic')
The initial problem occurred with migrate, which I overcame by changing the fk model to one in the same app, migrating, then changing the fk back to the above the migrate command is successful.
I can run my unittests using django 1.6.5, and my functional tests may run if I stop using StaticLiveServerCase.
I have seen several bugs about migrated and unmigrated apps not able to use FKs, but both of my apps have migrations before introducing the FK. Thanks in advance.