前言

 

一、异常描述

django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates:

二、解决思路

 

如果你是使用pycharm建立项目django时你填写了application那么他会自动帮你建立一个application(如centers)


INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'centers.apps.CenterConfig',

    # 'centers'  # 新加的app
]

你只要将你自己在settings.py文件中添加的‘centers’去掉就可以正确的返回页面了,这里因为pycharm已经自动帮你添加到里面了。

 

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐