django计数器: form collections import Counter

counts = Counter(
                app_config.name for app_config in self.app_configs.values())

Counter({'django_celery_beat': 1, 'django.contrib.sessions': 1, 'corsheaders': 1, 'apps.vanilla': 1, 'django.contrib.messages': 1, 'apps.user': 1, 
'apps.cmdbmgr': 1, 'apps.common': 1, 'apps.flowmgr': 1, 'django.contrib.admin': 1, 'django.contrib.contenttypes': 1, 'django.contrib.staticfiles': 1,
'django_celery_results': 1, 'django.contrib.auth': 1})

  

posted @ 2020-06-19 16:26  Fmaj-7  阅读(133)  评论(0编辑  收藏  举报