Changes between Version 2 and Version 4 of Ticket #32938


Ignore:
Timestamp:
Jul 20, 2021, 5:59:32 AM (3 years ago)
Author:
Tim Graham
Comment:

Can we set the app name to be same when importing a model, in migrations, and in its apps.py name?

Docs for foreign key says, "To refer to models defined in another application, you can explicitly specify a model with the full application label. For example, if the Manufacturer model above is defined in another application called production, you’d need to use: ..."

Perhaps it would help to link app_label and "full application label" (which should perhaps be renamed app_label) in this section. In the docs for app_label you can read "It defaults to the last component of name."

I believe this clarifies your confusion.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32938

    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #32938 – Description

    v2 v4  
    3030Is this not a bit confusing. What I am suggesting is consistency in the app.name.
    3131The app name is not clearly define and consistantly applied.
    32 Can we set the app name to be same when importing a model, in migrations, and in i'ts apps.py name?
     32Can we set the app name to be same when importing a model, in migrations, and in its apps.py name?
Back to Top