Opened 10 years ago

Last modified 10 years ago

#23305 closed Cleanup/optimization

Models that are imported on app's import time are invisible to makemessages — at Initial Version

Reported by: Rafał Pitoń Owned by: nobody
Component: Documentation Version: 1.7-rc-2
Severity: Normal Keywords: afraid-to-commit
Cc: cmawebsite@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Models that are imported together within app's init.py, or by modules imported from that become invisible for Django if app uses apps.py and AppConfig.

To reproduce it create app with basic config and simple model in models.py. If this model is imported inside init.py, or other module imported in init.py, it will become invisible to makemigrations.

Tried this both with default_app_config as well as giving full path to AppConfig in INSTALLED_APPS.

I'm running latest code from 1.7 branch.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top