makemigrations - returns No changes detected ???

3,570 views
Skip to first unread message

niko...@gmail.com

unread,
Nov 17, 2014, 6:57:57 AM11/17/14
to django...@googlegroups.com

First , congratulation on Oscar 1.0!!!

Now, I have a problem customising catalogue app. Steps that do:


1.After successful 
-------
./manage.py oscar_fork_app catalogue /apps
------

2.And editing lines on settings.py to:
---------
  from oscar import get_core_apps

  INSTALLED_APPS = INSTALLED_APPS + get_core_apps(['apps.catalogue'])

----

3. Afcorse editing models.py into newly create catalogue dir:

---------------

from django.db import models

from oscar.apps.catalogue.abstract_models import AbstractProduct

class Product(AbstractProduct):

    video_url = models.URLField()

from oscar.apps.catalogue.models import *  # noqa

---------------

4. I can not get the migrations to populate the DB correctly.

./manage.py makemigrations catalogue

 returns 

No changes detected in app 'catalogue'


I did notice  on https://github.com/django-oscar/django-oscar/blob/master/docs/source/releases/v1.0.rst 

---

Warning

The catalogue app has a data migration to determine the product structure. Please double-check it's outcome and make sure to do something similar if you have forked the catalogue app.

---

Any ideas?


Thanks,

Alex


Joshua Wedekind

unread,
Nov 17, 2014, 8:34:38 AM11/17/14
to django...@googlegroups.com
I'm assuming this line is a typo:
./manage.py oscar_fork_app catalogue /apps

Wouldn't that place the forked app in your file system's root/apps folder?

niko...@gmail.com

unread,
Nov 18, 2014, 2:56:48 AM11/18/14
to django...@googlegroups.com
Correct,  that is a typo. I should say

./manage.py oscar_fork_app catalogue apps/

Any thoughts?

Joshua Wedekind

unread,
Nov 18, 2014, 10:43:13 PM11/18/14
to django...@googlegroups.com
Interesting. I can't see how INSTALLED_APPS is initially defined. Are you sure it is a list and not a tuple?

niko...@gmail.com

unread,
Nov 19, 2014, 3:39:55 AM11/19/14
to django...@googlegroups.com
Spot on Joshua, THANKS.

To clarify :
I had 
-------
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps('apps.catalogue')
-----

Where the correct syntax should be:

-------
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps('[apps.catalogue]')
-----

Thanks again.

Joshua Wedekind

unread,
Nov 19, 2014, 11:21:16 AM11/19/14
to django...@googlegroups.com
Oh good. I'm glad you've figured it out.

One more thing, just for anyone who might see this thread later, I believe you meant:

INSTALLED_APPS = INSTALLED_APPS + get_core_apps(['apps.catalogue'])

with the quotation marks inside the brackets.
Reply all
Reply to author
Forward
0 new messages