Я изучаю структуру django, и у меня есть проблема с django. Когда вы запускаете syncdb , помогите мне, пожалуйста, как исправить ошибку?DatabaseError python manage.py syncdb
используемые файлы
settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangodb1',
'USER': 'root',
'PASSWORD': 'toor',
'HOST': '',
'PORT': '',
}
}
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
urls.py
from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'testsite.views.home', name='home'),
# url(r'^testsite/', include('testsite.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
[email protected]:~/testsite# python manage.py syncdb
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s AND `django_content_type`.`app_label` = %s)' at line 1")
Это может быть связано: http://grokbase.com/p/gg/django-updates/129hmzh0q4/django-18970-django-python-3-experimental-support-python-manage-py-syncdb- 1064-error – karthikr
help me pleaseee .. – PyDroid
Возможный дубликат [Ошибка Django syncdb: одна или несколько моделей не проверялись] (http://stackoverflow.com/questions/2608017/django-syncdb-error-one-or-more -models-did-not-validate) – PyDroid