0
我面临的一个错误而执行python manage.py suncdb
错误,当我执行执行syncdb
误差
C:\Python25\lib\site-packages\django\conf\__init__.py:75: DeprecationWarning: Th
e ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
"use STATIC_URL instead.", DeprecationWarning)
C:\Python25\lib\site-packages\django\contrib\localflavor\ca\ca_provinces.py:14:
RuntimeWarning: There have been recent changes to the CA localflavor. See the re
lease notes for details
RuntimeWarning
Creating tables ...
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line
442, in execute_manager
utility.execute()
File "C:\Python25\lib\site-packages\django\core\management\__init__.py", line
379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python25\lib\site-packages\django\core\management\base.py", line 191,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python25\lib\site-packages\django\core\management\base.py", line 220,
in execute
output = self.handle(*args, **options)
File "C:\Python25\lib\site-packages\django\core\management\base.py", line 351,
in handle
return self.handle_noargs(**options)
File "C:\Python25\lib\site-packages\django\core\management\commands\syncdb.py"
, line 109, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
File "C:\Python25\lib\site-packages\django\core\management\sql.py", line 189,
in emit_post_sync_signal
interactive=interactive, db=db)
File "C:\Python25\lib\site-packages\django\dispatch\dispatcher.py", line 172,
in send
response = receiver(signal=self, sender=sender, **named)
File "C:\Python25\lib\site-packages\django\contrib\contenttypes\management.py"
, line 47, in update_contenttypes
content_type_display = '\n'.join([' %s | %s' % (ct.app_label, ct.model) f
or ct in content_types])
AttributeError: 'unicode' object has no attribute 'app_label'
,我试图转换数据库和所有的表和字段排序规则utf8_general_ci
但没有改变
感谢raacer,我只是迁移网站,得到了最近的数据库备份和文件,到本地,但它给了我这个错误。 –
你使用什么样的django版本,以前使用过什么版本?看来你有Python 2.5,它是否对应于你从原来的Python版本迁移? – raacer
如果你不确定,我建议将你的python升级到最新的2.x版本,看看是否仍然出现错误。 – raacer