After some tests, the problem came from the lack of the file models.py The __init__ is there and is ok.
If I run without models.py file: python3 manage.py migrations <app> --empty python3 manage.py migrate -> that doesn't take into account my <app> But if I run the same commands with models.py (even empty), it takes into account my app and migrate it. Seems to be something weird to me, cause the 0001_initial.py migration is exactly the same generated file either case. Anyway, problem solved, but weird behavior from my point of view? If anyone can tell me why… Thanks for the help :) On 16/07/14 07:06, j1z0 wrote: > Are you sure you have your django app in your settings.INSTALLED_APPS and > your django app has a migrations folder underneath it with an __init__.py > file? > > I'm pretty sure that should be all you need to have in place so you can run > a migration. > > Cheers, > Jeremy > > > > On Tuesday, 15 July 2014 22:20:57 UTC+8, aRkadeFR wrote: > > > > Hello everyone, > > > > First post on this mailing list. Big thanks to the community and the core > > dev > > of Django! > > > > I'm using Django 1.7c1 with python 3.2 or 3.4. > > > > I'm splitting lots of my website as Django apps. So my main app is > > handling > > (only) the urls routing, the settings, some tests and that's it. > > > > I want to do some data migrations. For example add some > > django.contrib.sites.models.Site objects to the database when I migrate my > > app. Or some flags (django-waffle) etc. All the data relates to this app. > > > > I don't want to put this data migration into the django.contrib.sites > > folder > > cause it's already packaged as root etc. So it's not runnable from my > > development user (to create or read the file into the folder). And it's > > the > > same problem for all these apps I want to add data into. > > > > If I run "python3 manage.py makemigrations --empty <app>", it create the > > 0001_initial.py migrations. I create the function to add the data inside > > the > > database, and try to run the migrations with "python3 manage.py migrate > > <app>", but get the error: > > > > "CommandError: App <app> does not have migrations (you cannot > > selectively > > sync unmigrated apps)" > > > > So I'm searching how can I make this <app> migrated? Create an empty > > initial > > migrations? so the django migrations take this app into account. > > > > Thank you for all your help > > > > aRkadeFR > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/2c369324-da9a-4e3e-a6f1-16cec96cc3cd%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20140717115955.GA8280%40rkade-thinkpad. For more options, visit https://groups.google.com/d/optout.

