Makemigrations doesn't detect changes for extended models in Django 1.7
My .py settings:
INSTALLED_APPS = (
'common',
'users',
)
AND
general / models.py:
class EduModel(models.Model):
class Meta:
abstract = True
app_label = 'ques_app_data'
users / models.py:
class UserSubscription2(models.Model):
test = models.CharField(max_length=30, default='')
class UserSubscription3(EduModel):
test2 = models.CharField(max_length=30, default='')
makemigraions
detects changes for UserSubscription2, but not for UserSubscription3 (child class). Can someone explain this?
source to share
This is because yours is app_label
ques_app_data
not included in the INSTALLED_APPS
.
INSTALLED_APPS = (
'common',
'users',
'ques_app_data',
)
I assume you have an application ques_app_data
. If not, then this is a problem, because it app_label
must reference an existing oneDjango app
.
Refer https://docs.djangoproject.com/en/1.7/ref/models/options/#app-label
source to share