Installation for Django 1.9

161 views
Skip to first unread message

Leonard Monnier

unread,
Feb 18, 2016, 1:37:45 AM2/18/16
to Django FeinCMS
Hello,

When trying to install FeinCMS for Django 1.9 I face an issue with the migrations.

Once I create my app with the example page model (https://feincms-django-cms.readthedocs.org/en/latest/page.html) and run the migration:

python manage.py makemigrations myapp

I get the following message:
No changes detected in app 'myapp'

and of course no tables are created in the database.

I tried the solution proposed in the documentation concerning migrations (https://feincms-django-cms.readthedocs.org/en/latest/migrations.html)

Migration_MODULES = {
   
'page': 'myapp.migrate.page',
}

but get the following error when I run the migrations:

ImportError: No module named 'myapp.migrate'

looking at the forum there were alternative syntaxes such as:

Migration_MODULES = {
   
'page': 'myapp.page_migrations',
}

but it leads to the initial situation of the "No changes detected" message.

To clarify, my manage.py file is located in the same folder as the myapp application.

Many thanks in advance for your support.

Christopher Baines

unread,
Feb 18, 2016, 5:29:01 AM2/18/16
to django-...@googlegroups.com
On 18/02/16 06:37, Leonard Monnier wrote:
> Hello,
>
> When trying to install FeinCMS for Django 1.9 I face an issue with the
> migrations.
>
> Once I create my app with the example page model
> (https://feincms-django-cms.readthedocs.org/en/latest/page.html)
> <https://feincms-django-cms.readthedocs.org/en/latest/page.html> and run
> the migration:
>
> |
> python manage.py makemigrations myapp
> |
>
> I get the following message:
> |
> Nochanges detected inapp 'myapp'
> |
>
> and of course no tables are created in the database.
>
> I tried the solution proposed in the documentation concerning migrations
> (https://feincms-django-cms.readthedocs.org/en/latest/migrations.html)
>
> |
> Migration_MODULES={
> 'page':'myapp.migrate.page',
> }
> |
>
> but get the following error when I run the migrations:
>
> |
> ImportError:Nomodulenamed 'myapp.migrate'
> |
>
> looking at the forum there were alternative syntaxes such as:
>
> |
> Migration_MODULES={
> 'page':'myapp.page_migrations',
> }
> |
>
> but it leads to the initial situation of the "No changes detected" message.
>
> To clarify, my manage.py file is located in the same folder as the myapp
> application.
>
> Many thanks in advance for your support.

When using makemigrations and migrate, you need to specify the page (or
medialibrary) app.

By default, this will attempt to create a migration where you have
FeinCMS installed. When using FeinCMS, I set the MIGRATION_MODULES
setting to store the migrations somewhere more useful (as you mention
above).

So, specify MIGRATION_MODULES (and remember to create the necessary
__init__.py files in the entire hierarchy), and then run:
python manage.py makemigrations page
python manage.py migrate page


signature.asc

Leonard Monnier

unread,
Feb 18, 2016, 1:04:04 PM2/18/16
to Django FeinCMS, ma...@cbaines.net
Perfect, thank you very much!
Now that Migrate is the default, shouldn't be the doc updated? (I'm happy trying to make a pull request).

To clarify, I've ran the following command to create the initial migration:

python manage.py makemigrations --empty feincms

python manage.py migrates feincms

and then:

python manage.py makemigrations page

python manage.py makemigrations medialibrary

python manage.py migrates page

python manage.py migrates medialibrary

Rene Dohmen

unread,
May 3, 2016, 6:08:54 PM5/3/16
to Django FeinCMS, ma...@cbaines.net
Thanks; just what I needed :)

Reply all
Reply to author
Forward
0 new messages