开发者

Any idea why i am getting this error?

I am trying to install django-cms in my ubuntu pc. I am getting this error:

    Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self开发者_如何学C.argv)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 209, in execute
    translation.activate('en-us')
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/__init__.py", line 100, in activate
    return _trans.activate(language)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 202, in activate
    _active.value = translation(language)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 185, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 162, in _fetch
    app = import_module(appname)
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/local/lib/python2.6/dist-packages/cms/__init__.py", line 14, in <module>
    patch_settings()
  File "/usr/local/lib/python2.6/dist-packages/cms/conf/__init__.py", line 32, in patch_settings
    post_patch()
  File "/usr/local/lib/python2.6/dist-packages/cms/conf/patch.py", line 26, in post_patch
    settings.CMS_TEMPLATES = tuple(settings.CMS_TEMPLATES) + (
TypeError: 'NoneType' object is not iterable

Any idea why is this error coming?

thanks Edit -1 -- HI guys, Yes you were rightm i didnt put cms_templates in settings.py. I did it now, but now I am getting this error.

DatabaseError at /

no such table: cms_page

Request Method: GET Request URL: http://localhost:8000/ Django Version: 1.3 Exception Type: DatabaseError Exception Value:

no such table: cms_page

Exception Location: /usr/local/lib/python2.6/dist-packages/django/db/backends/sqlite3/base.py in execute, line 234 Python Executable: /usr/bin/python Python Version: 2.6.6 Python Path:

['/home/naveen/django_projects/myproject', '/usr/local/lib/python2.6/dist-packages/pip-0.8.3-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.6/gtk-2.0']

Server time: Fri, 25 Mar 2011 15:34:04 -0500


It's looking for a settings.CMS_TEMPLATES. It's trying to make None a tuple which would throw that error.

Make sure you have a CMS_TEMPLATES defined.

http://docs.django-cms.org/en/2.1.3/getting_started/tutorial.html#configuration-and-setup


Your CMS_TEMPLATES settings is None, I have no idea what that is, but I'm guessing it a setting you need to configure somewhere.


settings.CMS_TEMPLATES is None, I believe. It's hard to tell without a sample of the code in question.


Referring to edit 1:

Which commands are you using? Are you following the tutorial? I guess you did not do:

python manage.py syncdb

If you just wrote your models, this command will create the tables in the db. Otherwise the database is empty, which is the reason why Django can't find the cms_pagetable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜