[Django] #23358: migrations

20 views
Skip to first unread message

Django

unread,
Aug 24, 2014, 4:49:13 AM8/24/14
to django-...@googlegroups.com
#23358: migrations
-------------------------------+--------------------
Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
I've a project with this layout

{{{
project
project.myapp
... # other apps
}}}

`project` and `project.myapp` have both models.py
`project.myapp.models` has `MyModel` defined

If I have
INSTALLED_APPS = (
'project.myapp',
'project',
)
django recognize `project.myapp.models.MyModel` correctly as
`myapp.MyModel`.

otherwise if I have
INSTALLED_APPS = (
'project',
'project.myapp',
)
django recognize `project.myapp.models.MyModel` correctly as
`project.MyModel`.

--
Ticket URL: <https://code.djangoproject.com/ticket/23358>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 24, 2014, 8:05:51 AM8/24/14
to django-...@googlegroups.com
#23358: migrations
-------------------------------+--------------------------------------

Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

I assume you meant "incorrectly" in the last line. If so, that's probably
the same issue as #23348. Make sure your `project` app doesn't import
models from `project.myapp`.

Your title says "migrations" but I'm not sure how this is related to
migrations.

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:1>

Django

unread,
Aug 24, 2014, 8:27:43 AM8/24/14
to django-...@googlegroups.com
#23358: migrations
-------------------------------+--------------------------------------

Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by rsalmaso):

Yes, I mean 'incorrectly'.

I'm porting a large project already in production to 1.7 so probably there
is some import left, I'll check if it's the same issue of
https://code.djangoproject.com/ticket/23348.

I say "migrations" because I find the problem with `makemigrations`, and
only one app is misbehaving, the others are fine (all nested).

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:2>

Django

unread,
Aug 24, 2014, 8:48:09 AM8/24/14
to django-...@googlegroups.com
#23358: with nested applications different applications ordering cause wrong
app_label for some models
-------------------------------+--------------------------------------

Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:3>

Django

unread,
Aug 24, 2014, 8:48:29 AM8/24/14
to django-...@googlegroups.com
#23358: with nested applications different applications ordering cause wrong
app_label for some models
-------------------------------+--------------------------------------
Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by rsalmaso:

Old description:

> I've a project with this layout
>
> {{{
> project
> project.myapp
> ... # other apps
> }}}
>
> `project` and `project.myapp` have both models.py
> `project.myapp.models` has `MyModel` defined
>
> If I have
> INSTALLED_APPS = (
> 'project.myapp',
> 'project',
> )
> django recognize `project.myapp.models.MyModel` correctly as
> `myapp.MyModel`.
>
> otherwise if I have
> INSTALLED_APPS = (
> 'project',
> 'project.myapp',
> )
> django recognize `project.myapp.models.MyModel` correctly as
> `project.MyModel`.

New description:

I've a project with this layout

{{{
project
project.myapp
... # other apps
}}}

`project` and `project.myapp` have both models.py
`project.myapp.models` has `MyModel` defined

If I have
INSTALLED_APPS = (
'project.myapp',
'project',
)
django recognize `project.myapp.models.MyModel` correctly as
`myapp.MyModel`.

otherwise if I have
INSTALLED_APPS = (
'project',
'project.myapp',
)

django recognize `project.myapp.models.MyModel` incorrectly as
`project.MyModel`.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:4>

Django

unread,
Aug 24, 2014, 8:50:37 AM8/24/14
to django-...@googlegroups.com
#23358: with nested applications different applications ordering cause wrong
app_label for some models
-------------------------------+--------------------------------------
Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by rsalmaso):

Ops, update title with correct string, was left stub title

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:5>

Django

unread,
Aug 24, 2014, 10:20:27 AM8/24/14
to django-...@googlegroups.com
#23358: with nested applications different applications ordering cause wrong
app_label for some models
-------------------------------+--------------------------------------
Reporter: rsalmaso | Owner: nobody
Type: Uncategorized | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by rsalmaso):

* status: new => closed
* resolution: => invalid


Comment:

Yep, that was the problem.

Close the ticket as invalid.

--
Ticket URL: <https://code.djangoproject.com/ticket/23358#comment:6>

Reply all
Reply to author
Forward
0 new messages