2
안녕하세요 장고에 아주 새로운 오전과 내가 파이썬 3.4를 사용하고장고 manage.py의 syncdb 오류
Traceback (most recent call last):
File "C:\Users\B3dog\Desktop\MyWebsite\mysite\manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django-1.8-py3.4.egg\django\core\managemen
t\__init__.py", line 330, in execute_from_command_line`enter code here`
utility.execute()
File "C:\Python34\lib\site-packages\django-1.8-py3.4.egg\django\core\managemen
t\__init__.py", line 304, in execute
django.setup()
File "C:\Python34\lib\site-packages\django-1.8-py3.4.egg\django\__init__.py",
line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python34\lib\site-packages\django-1.8-py3.4.egg\django\apps\registry.
py", line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, d
uplicates: admin
을 "manage.py syncdb를"에 입력 할 때 내 명령 프롬프트에서이 오류가 계속되고있다. 1 및 Django 버전 1.8은 django.get_version()을 사용하여 찾았습니다. 나는 거기에 대한 stackoverflow에 대한 답변을 알아,하지만 내가 찾은 그들 중 누구도 최신되지 않습니다.
편집 : 당신은 INSTALLED_APPS
내부 django.contrib.admin
의 두 항목이 내 settings.py
"""
Django settings for mysite project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'pl=&jot_vf_([email protected]^[email protected](up76otxwqm3wj3)x'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'mysite.urls'
WSGI_APPLICATION = 'mysite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mysite.db',
}
}
# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/
STATIC_URL = '/static/'
왜 천재입니까? 이 물건을 볼 수있는 당신 같은 사람들은 신입니다. – b3dog
@ b3dog 감사합니다,하지만 정말 그냥 추적 정보 및 장고 설정의 특성에 대해 조금 알면 제공하는 정보를 다음과 같습니다. 그리 어렵지 않습니다. 장고로 작업할수록 더 많이 볼 수 있고 프레임 워크를 더 즐기게됩니다. – alecxe
Django 1.8 ??? 1.7은 안정적이지 않다 – Alvaro