Changes between Initial Version and Version 1 of Ticket #26242, comment 2


Ignore:
Timestamp:
Feb 19, 2016, 8:34:38 AM (9 years ago)
Author:
Jakub Skiepko

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26242, comment 2

    initial v1  
    11My use case is probably silly and not worth of braking your constraints, but I believe this PR does not break one about consistency of app registry - it just lets you do what could do anyway but earlier. The other constraint about importing models after apps is not documented properly and I didn't knew about it. ref: https://docs.djangoproject.com/en/1.9/ref/applications/#how-applications-are-loaded ("Strictly speaking, Django allows importing models once their application configuration is loaded")
    22----
    3 In my opinion it is not consistient, that models have to magicaly install themselves in metaclass while applications are installed manualy using INSTALLED_APPS. If it was the app who installs models using in example self.installed_models you wohttps://code.djangoproject.com/ticket/26242#no4uldn't need any additional constraints about import order.
     3In my opinion it is not consistient, that models have to magicaly install themselves in metaclass while applications are installed manualy using INSTALLED_APPS. If it was the app who installs models using in example self.installed_models you wouldn't need any additional constraints about import order.
    44----
    55My use case: In my projects i like to have "external api" of application in __init__.py Sadly lots of this api uses models. It is just a way to have "import models" statement in my __init__.py, apps.py and every module they importing from on module level and not copied to every function there which obscures readability. I would rather explicit assign app_labels to my models.
Back to Top