Объект 'FilterExpression' не имеет атрибута 'value' - PullRequest
0 голосов
/ 17 июня 2019

Я мигрирую с Django 1.8.17 до 1.11.21. Я переустановил все совместимые пакеты и сделал необходимые изменения кода. Но он по-прежнему выдает ошибку «У объекта FilterExpression нет атрибута« значение »», и я застрял.

Должен отображаться шаблон страницы. Проблема связана с заполнителем.

Ниже приведен скриншот.

enter image description here

Вот полный след.

    Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.11.21
Python Version: 2.7.15
Installed Applications:
['django.contrib.contenttypes',
 'djangocms_admin_style',
 'admin_shortcuts',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.redirects',
 'django.contrib.humanize',
 'test_without_migrations',
 'django_nose',
 'raven.contrib.django.raven_compat',
 'waffle',
 'easy_thumbnails',
 'django_extensions',
 'addendum',
 'sorl.thumbnail',
 'treebeard',
 'mptt',
 'embed_video',
 'filer',
 'menus',
 'sekizai',
 'djangocms_text_ckeditor',
 'cms',
 'taggit',
 'taggit_labels',
 'compressor',
 'typogrify',
 'cmsplugin_filer_image',
 'cmsplugin_filer_file',
 'cmsplugin_filer_folder',
 'cmsplugin_filer_teaser',
 'cmsplugin_filer_video',
 'djangocms_teaser',
 'djangocms_link',
 'attachments',
 'video',
 'images',
 'meta',
 'sortedm2m',
 'tags',
 'formassembly',
 'locations',
 'maps',
 'profiles',
 'authors',
 'content',
 'blog',
 'news',
 'press',
 'funders',
 'issues',
 'statistics',
 'events',
 'partners',
 'stories',
 'results',
 'homepage_billboard',
 'takeovers',
 'publications',
 'financials',
 'careers',
 'feedback',
 'icontact',
 'user',
 'slideshow',
 'navigation',
 'redesign',
 'core',
 'extended_cms',
 'strata',
 'embeds',
 'carousel',
 'matchinggifts',
 'socialmedia',
 'media',
 'cms_navigation',
 'cms_containers',
 'cms_content',
 'cms_media',
 'cms_meta',
 'cms_posters',
 'cms_headers',
 'cms_model',
 'styleguide']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
 'geolocation.middleware.LocationMiddleware',
 'waffle.middleware.WaffleMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')


Template error:
In template /var/apps/cis_national/cis/app/templates/_2017/site/base.html, error at line 119
   'FilterExpression' object has no attribute 'value'   109 :             <a class="masthead-home" href="/" target="_top" o-base="mod--balance">
   110 :               <h2 class="vx--a11y">Communities In Schools</h2>
   111 :               <picture>
   112 :                 <source srcset="{% static '_2017/res/logo.landscape.png.webp' %}" type="image/webp">
   113 :                 <img class="site-logo" src="{% static '_2017/res/logo.landscape.png' %}" style="max-width: 50vw">
   114 :               </picture>
   115 :             </a>
   116 :           </div>
   117 :       </header>
   118 :       <div class="site-content" o-base="col--pStart mod--balance ord--next">
   119 :          {% placeholder "preview" %} 
   120 :         <main o-base="col--pStart mod--balance">{% placeholder "view" %}
   121 :         </main>{% get_placeholder "postview" as postview %}
   122 : 
   123 : {% if postview %}{% load static cms_tags extended_cms %}
   124 :               <aside class="strata--prefooter thm--texture-alt" o-condensed="matrix--pMiddle--sFull" o-base="col--pStart dm--xFull pos--rel pad--x50 pad--y100 rhy--yStart100" o-compressed="pad--x75 pad--y200" o-enhanced="pad--x100" o-extended="pad--y400">{{ postview }}
   125 :                     {% for plugin in instance.child_plugin_instances %}
   126 :                     {% render_plugin plugin %}
   127 :                     {% endfor %}
   128 : 
   129 : 


Traceback:

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  217.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  215.                 response = response.render()

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/response.py" in render
  107.             self.content = self.rendered_content

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  84.         content = template.render(context, self._request)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/backends/django.py" in render
  66.             return self.template.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render
  207.                     return self._render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in _render
  199.         return self.nodelist.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render
  990.                 bit = node.render_annotated(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957.             return self.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/classytags/core.py" in render
  146.         return self.render_tag(context, **kwargs)

File "/usr/local/venv/cis/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
  83.         rendered_contents = nodelist.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render
  990.                 bit = node.render_annotated(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957.             return self.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/classytags/core.py" in render
  146.         return self.render_tag(context, **kwargs)

File "/usr/local/venv/cis/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
  83.         rendered_contents = nodelist.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render
  990.                 bit = node.render_annotated(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957.             return self.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/classytags/core.py" in render
  146.         return self.render_tag(context, **kwargs)

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
  448.         return nodelist.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render
  990.                 bit = node.render_annotated(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957.             return self.render(context)

File "/usr/local/venv/cis/lib/python2.7/site-packages/classytags/core.py" in render
  146.         return self.render_tag(context, **kwargs)

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
  313.                 nodelist=nodelist,

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/plugin_rendering.py" in render_page_placeholder
  329.             self._preload_placeholders_for_page(current_page)

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/plugin_rendering.py" in _preload_placeholders_for_page
  497.             placeholders = page.rescan_placeholders().values()

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/models/pagemodel.py" in rescan_placeholders
  1591.         placeholders = [pl.slot for pl in self.get_declared_placeholders()]

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/models/pagemodel.py" in get_declared_placeholders
  1606.         return get_placeholders(self.get_template())

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/utils/placeholder.py" in get_placeholders
  250.         placeholder = node.get_declaration()

File "/usr/local/venv/cis/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in get_declaration
  324.         slot = self.kwargs['name'].var.value.strip('"').strip("'")

Exception Type: AttributeError at /
Exception Value: 'FilterExpression' object has no attribute 'value'

Пожалуйста, помогите !!

Спасибо.

...