diefenbach / django-lfs

An online-shop based on Django
http://www.getlfs.com
BSD 3-Clause "New" or "Revised" License
622 stars 222 forks source link

Portlets error after the migration to 0.9 #180

Closed DNX closed 7 years ago

DNX commented 9 years ago
Environment:

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

Django Version: 1.6.5
Python Version: 2.7.6
Installed Applications:
('lfs_theme',
 'compressor',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.flatpages',
 'django.contrib.redirects',
 'django.contrib.sitemaps',
 'django_countries',
 'pagination',
 'reviews',
 'portlets',
 'lfs',
 'lfs.addresses',
 'lfs.caching',
 'lfs.cart',
 'lfs.catalog',
 'lfs.checkout',
 'lfs.core',
 'lfs.criteria',
 'lfs.customer',
 'lfs.customer_tax',
 'lfs.discounts',
 'lfs.export',
 'lfs.gross_price',
 'lfs.mail',
 'lfs.manage',
 'lfs.marketing',
 'lfs.manufacturer',
 'lfs.net_price',
 'lfs.order',
 'lfs.page',
 'lfs.payment',
 'lfs.portlet',
 'lfs.search',
 'lfs.shipping',
 'lfs.supplier',
 'lfs.tax',
 'lfs.tests',
 'lfs.utils',
 'lfs.voucher',
 'lfs_contact',
 'lfs_order_numbers',
 'localflavor',
 'postal',
 'paypal.standard.ipn',
 'paypal.standard.pdt',
 'south')
Installed Middleware:
('django.middleware.csrf.CsrfViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
 'pagination.middleware.PaginationMiddleware')

Template error:
In template /tmp/lfs09a1/lfs-installer/eggs/lfs_theme-0.9.0a1-py2.7.egg/lfs_theme/templates/lfs/base.html, error at line 113
   'NoneType' object has no attribute '_base_manager   103 :         </div>
   104 : 
   105 :         <div id="breadcrumbs">
   106 :             <div class="container">
   107 :                 {% block breadcrumbs %}{% endblock %}
   108 :             </div>
   109 :         </div>
   110 : 
   111 :         <div id="content">
   112 :             <div class="container">
   113 :                  {% slots_information %} 
   114 : 
   115 :                 {% block wrapper %}
   116 :                     {% block left-slot-wrapper %}
   117 :                         {% if SlotLeft %}
   118 :                             <div class="span-5">
   119 :                                 <div class="left-slot">
   120 :                                     {% block left-slot %}
   121 :                                         {% lfs_portlet_slot 'Left' %}
   122 :                                     {% endblock %}
   123 :                                 </div>

Traceback:
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/core/handlers/base.py" in get_response
  112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/tmp/lfs09a1/lfs-installer/eggs/django_lfs-0.9.0a1-py2.7.egg/lfs/core/views.py" in shop_view
  31.         "shop": shop
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/shortcuts/__init__.py" in render_to_response
  29.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/loader.py" in render_to_string
  164.         return t.render(Context(dictionary))
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/base.py" in render
  140.             return self._render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/tmp/lfs09a1/lfs-installer/eggs/lfs_theme-0.9.0a1-py2.7.egg/lfs_theme/templatetags/lfs_theme_tags.py" in render
  33.                 has_portlets = portlets.utils.has_portlets(object, slot)
File "/tmp/lfs09a1/lfs-installer/eggs/django_portlets-1.1.1-py2.7.egg/portlets/utils.py" in has_portlets
  89.         if len(get_portlets(obj, slot)) > 0:
File "/tmp/lfs09a1/lfs-installer/eggs/django_portlets-1.1.1-py2.7.egg/portlets/utils.py" in get_portlets
  125.         portlets.append(portlet_assignment.portlet)
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/contrib/contenttypes/generic.py" in __get__
  137.                     rel_obj = ct.get_object_for_this_type(pk=getattr(instance, self.fk_field))
File "/tmp/lfs09a1/lfs-installer/eggs/Django-1.6.5-py2.7.egg/django/contrib/contenttypes/models.py" in get_object_for_this_type
  168.         return self.model_class()._base_manager.using(self._state.db).get(**kwargs)

Exception Type: AttributeError at /
Exception Value: 'NoneType' object has no attribute '_base_manager'
pigletto commented 9 years ago

Can you try with django portlets 1.2?

ghost commented 9 years ago

hello all

again problem with portlest i think, this is my error

schermata 2015-09-21 alle 15 52 02

when i try to load or modify a product from lfs 0.7.4 management i get this error. Also to start a minimal workflow of test, i had to disable {% lfs_start_portlets %} in base.html.

The rest seems to work fine, I have problems when I try to load only products someone can help me.

ah.., I tried to install all releases of portlets from 1.1.1 to1.4 without success. someone can help me please!

may thanks