(self, *app_labels, **options)
| 50 | ) |
| 51 | |
| 52 | def handle(self, *app_labels, **options): |
| 53 | include_deployment_checks = options["deploy"] |
| 54 | if options["list_tags"]: |
| 55 | self.stdout.write( |
| 56 | "\n".join(sorted(registry.tags_available(include_deployment_checks))) |
| 57 | ) |
| 58 | return |
| 59 | |
| 60 | if app_labels: |
| 61 | app_configs = [apps.get_app_config(app_label) for app_label in app_labels] |
| 62 | else: |
| 63 | app_configs = None |
| 64 | |
| 65 | tags = options["tags"] |
| 66 | if tags: |
| 67 | try: |
| 68 | invalid_tag = next( |
| 69 | tag |
| 70 | for tag in tags |
| 71 | if not checks.tag_exists(tag, include_deployment_checks) |
| 72 | ) |
| 73 | except StopIteration: |
| 74 | # no invalid tags |
| 75 | pass |
| 76 | else: |
| 77 | raise CommandError( |
| 78 | 'There is no system check with the "%s" tag.' % invalid_tag |
| 79 | ) |
| 80 | |
| 81 | self.check( |
| 82 | app_configs=app_configs, |
| 83 | tags=tags, |
| 84 | display_num_errors=True, |
| 85 | include_deployment_checks=include_deployment_checks, |
| 86 | fail_level=getattr(checks, options["fail_level"]), |
| 87 | databases=options["databases"], |
| 88 | ) |
nothing calls this directly
no test coverage detected