我立即在网站中断的django-cms模板文件夹中添加和编辑一些模板文件

时间:2019-01-23 14:13:01

标签: python django django-cms

用新的引导模板来设置新的django-cms,但是一旦我将文件添加到静态文件并编辑模板文件,它就会破坏代码:

即使我删除了所有导致整个问题的添加内容,它仍然无法再次使用

  Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x03EE6228>
Traceback (most recent call last):
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\core\management\commands\runserver.py", line 116, in inner_run
    autoreload.raise_last_exception()
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\utils\autoreload.py", line 251, in raise_last_exception
    six.reraise(*_exception)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\utils\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\apps\registry.py", line 108, in populate
    app_config.import_models()
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\django\apps\config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\cms\models\__init__.py", line 3, in <module>
    from .pagemodel import *  # nopyflakes
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\cms\models\pagemodel.py", line 148, in <module>
    class Page(models.Model):
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\cms\models\pagemodel.py", line 169, in Page
    template_choices = [(x, _(y)) for x, y in get_cms_setting('TEMPLATES')]
  File "C:\Users\Moze\Projects\Pythons\new\env\lib\site-packages\cms\models\pagemodel.py", line 169, in <listcomp>
    template_choices = [(x, _(y)) for x, y in get_cms_setting('TEMPLATES')]
ValueError: too many values to unpack (expected 2)

看起来很容易添加html模板并开始设置占位符

0 个答案:

没有答案