#36424: Identically named models in different apps -------------------------------------+------------------------------------- Reporter: john-parton | Owner: (none) Type: Bug | Status: new Component: Core (Management | Version: 5.2 commands) | 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 Clifford Gama):
Thanks for taking the time to create this ticket. I can reproduce this, but for me this is expected behavior, as documented [https://docs.djangoproject.com/en/5.2/ref/django-admin/#shell here]: > Models from apps listed earlier in INSTALLED_APPS take precedence. That said, the note could benefit from improved wording to make the meaning more explicit. E.g. > If multiple apps define models with the same name, the model from the app listed earlier in INSTALLED_APPS will overwrite any previously imported model of the same name. `isort`'s role isn't documented and can easily confuse users trying to understand why one model was imported over another. I think we should add a note in the documentation and/or shell command help that the order shown may be affected by `isort` and may not the order actually used? Leaving it unreviewed for now so others can weigh in on whether a warning or automatic resolution for name conflicts is worth pursuing. -- Ticket URL: <https://code.djangoproject.com/ticket/36424#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/django-updates/010701971f8e81ea-6eb5cf1e-ea72-4d3c-8652-8eebe64d250c-000000%40eu-central-1.amazonses.com.