id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 7198,improved error message on apps without models.py files,George Vilches,Justin Lilly,"When attempting to run python manage.py sql (or sqlall, sqlindexes, etc.), if one of the apps listed does not have any models, the command will generate this error. {{{ Error: App with label XXXXX could not be found. Are you sure your INSTALLED_APPS setting is correct? }}} The solution is to allow emptyOK=True when the models are pulled from each app. (Patch attached). There are several reasons to create apps that have no models.py, not the least of which is to register more management commands with your project in their own independent app (which you could then include in several other projects). Someone trying to automate the use of the management commands to generate SQL would not be able to determine easily which apps do and do not have models.py, but it is not in any way harmful to just allow emptyOK=True, as all other app errors will still be caught, and the output does not change in any way before or after the patch. ",Bug,closed,Core (Other),dev,Normal,fixed,management command sql sqlall,sanfordarmstrong@… johann@… gabehr@… noah@… brianz@… Jari Pennanen omer.drow@… hs@… Silver_Ghost,Ready for checkin,1,0,0,0,0,0