开发者

Error when i execute syncdb

开发者 https://www.devze.com 2023-04-09 06:17 出处:网络
I am facing an error while executing python manage.py suncdb the error is C:\\Python25\\lib\\site-packages\\django\\conf\\__init__.py:75: DeprecationWarning: Th

I am facing an error while executing python manage.py suncdb

the error is

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__)
  Fi开发者_运维知识库le "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'

and i tried to convert DB and all tables and fields collation to utf8_general_ci but nothing changed


The error says you've got a string instead of Model Meta options. It's not related to collation probably.

What change have you made before the error appeared?


I had this issue, I just dropped the database and re-ran syncdb and it was fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消