startapp时出现 CommandError: 'xxxxx' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.错误
原因可能是在settings.py中加入了
sys.path.append(os.path.join(BASE_DIR, 'app'))
解决办法,先将上面这行代码注释掉
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'django_filters',
'users',
'goods',
'order',
'ckeditor',
'ckeditor_uploader',
]
并将创建的应用名称前,加上路径app,例如'app.users'
startapp成功后,修改回去可以了
标签:name,错误,app,startapp,django,CommandError,contrib From: https://www.cnblogs.com/vPYer/p/17551951.html