Opened 11 years ago
Closed 11 years ago
#23358 closed Uncategorized (invalid)
with nested applications different applications ordering cause wrong app_label for some models
| Reported by: | Raffaele Salmaso | Owned by: | nobody |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | raffaele.salmaso@… | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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.
Change History (6)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
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).
comment:3 by , 11 years ago
| Summary: | migrations → with nested applications different applications ordering cause wrong app_label for some models |
|---|
comment:4 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:6 by , 11 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Yep, that was the problem.
Close the ticket as invalid.
I assume you meant "incorrectly" in the last line. If so, that's probably the same issue as #23348. Make sure your
projectapp doesn't import models fromproject.myapp.Your title says "migrations" but I'm not sure how this is related to migrations.