stefanfoulis/django-filer — pull request #471 by skirsdeda (2014-12-10 13:50:58+00:00)
Title: fix Django migrations to support custom Image model (FILER_IMAGE_MODEL)

Trying to syncdb with Django 1.7 when using custom image model (FILER_IMAGE_MODEL setting) fails.
First I tried adding swappable_dependency to initial migration but this also fails because app with custom Image model has to depend on Filer's 0001_initial migration (for File table) and this results in circular dependency error.
So I created 0002 migration specifically for Image model. It also skips filer_image table creation if custom Image model is used (I think this is logical because default Image model is effectively unavailable when custom model is used).
It's also worth noting that the app with custom model must have custom image model's table created in the initial migration (not in subsequent migrations). So I suppose it would be good to copy the following 2 warnings from Django docs to Filer's docs:
https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#substituting-a-custom-user-model