执行syncdb时出错



执行python manage.py suncdb时出现错误

错误是

C:Python25libsite-packagesdjangoconf__init__.py:75: DeprecationWarning: Th
e ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
C:Python25libsite-packagesdjangocontriblocalflavorcaca_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:Python25libsite-packagesdjangocoremanagement__init__.py", line
442, in execute_manager
    utility.execute()
  File "C:Python25libsite-packagesdjangocoremanagement__init__.py", line
379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:Python25libsite-packagesdjangocoremanagementbase.py", line 191,
 in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:Python25libsite-packagesdjangocoremanagementbase.py", line 220,
 in execute
    output = self.handle(*args, **options)
  File "C:Python25libsite-packagesdjangocoremanagementbase.py", line 351,
 in handle
    return self.handle_noargs(**options)
  File "C:Python25libsite-packagesdjangocoremanagementcommandssyncdb.py"
, line 109, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive, db)
  File "C:Python25libsite-packagesdjangocoremanagementsql.py", line 189,
in emit_post_sync_signal
    interactive=interactive, db=db)
  File "C:Python25libsite-packagesdjangodispatchdispatcher.py", line 172,
in send
    response = receiver(signal=self, sender=sender, **named)
  File "C:Python25libsite-packagesdjangocontribcontenttypesmanagement.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'

和我试图将DB和所有表和字段排序转换为utf8_general_ci,但没有改变

错误说你有一个字符串而不是模型元选项。这可能与排序无关。

在错误出现之前你做了什么更改?

我有这个问题,我只是放弃了数据库,重新运行syncdb,它是好的。

最新更新