Ticket #1127 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

Path for migration data

Reported by: jgsogo Owned by: andrew
Priority: major Milestone:
Component: commands Version: unknown
Keywords: Cc:

Description

I have the following folders structure on disk:

  • I have an application called 'articles' somewhere on my disk where python can find it.
  • And my working project with a local app called also 'articles' (add some models to the third party articles app).

And the following in settings:

INSTALLED_APPS = (
    [...]
    'articles', # Third party app
    'myproject.articles', # My app
    'south',
)

When I call migrations for the articles app south is looking for them at /myproject/articles/migrations/ instead of [Python-Path]/articles/migrations/....

I can workaround this just renaming my app, but wanted to let you know about it. It would be kind if south can manage both:

./manage.py migrate articles
./manage.py migrate myproject.articles

Change History

comment:1 Changed 2 years ago by andrew

  • Status changed from new to closed
  • Resolution set to invalid

I'm afraid you've fallen into the trap of having two apps named the same thing - that's not allowed in Django (but annoyingly it will continue to work in most cases, apart from things like South that access models based on app label).

We can't fix this in South, it's something Django has to tackle as a whole (and which is being slowly dealt with). In the meantime, you'll have to rename one of your apps.

comment:2 Changed 2 years ago by jgsogo

I thought it was a problem related to Django too. If I'm doing it this way is because models keep within the same app_label in admin interface... maybe south could get rid of this ;D

Anyway, thanks for the quick response and the great app. I'll change my app's name.

Note: See TracTickets for help on using tickets.