Changes between Initial Version and Version 1 of Ticket #29506, comment 1
- Timestamp:
- Jun 19, 2018, 1:44:15 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29506, comment 1
initial v1 1 1 https://github.com/django/django/pull/10061 2 3 4 {{{ 5 + # Make sure the app they asked for exists 6 + if options['app_label']: 7 + app_label = options['app_label'] 8 + try: 9 + apps.get_app_config(app_label) 10 + except LookupError: 11 + if '.' in app_label: 12 + raise CommandError( 13 + "'%s' is not a valid app label. Did you mean '%s'?" % ( 14 + app_label, 15 + app_label.split('.')[-1], 16 + ) 17 + ) 18 + else: 19 + raise CommandError("App '%s' could not be found. Is it in INSTALLED_APPS?" % app_label) 20 }}} 21