feincms / feincms-elephantblog

A blog for FeinCMS
feinheit.ch/labs/
BSD 3-Clause "New" or "Revised" License
42 stars 38 forks source link

'tuple' object has no attribute 'extend' #30

Closed EdwardIII closed 11 years ago

EdwardIII commented 11 years ago

I'm running feincms 1.7.4 and feincms-elephantblog 0.3.0.

On first run I'm getting the error 'tuple' object has no attribute 'extend'

Stacktrace:

Environment:

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

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'south',
 'feincms',
 'mptt',
 'feincms.module.page',
 'feincms.module.medialibrary',
 'elephantblog',
 'core')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/home/edward/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  103.                     resolver_match = resolver.resolve(request.path_info)
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  319.             for pattern in self.url_patterns:
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  347.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  342.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/edward/python/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/edward/Projects/MyProject/MyProject/urls.py" in <module>
  7. admin.autodiscover()
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/__init__.py" in autodiscover
  29.             import_module('%s.admin' % app)
File "/home/edward/python/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/edward/python/lib/python2.7/site-packages/elephantblog/admin.py" in <module>
  28. admin.site.register(models.Entry, models.EntryAdmin)
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/sites.py" in register
  101.                 self._registry[model] = admin_class(model, self)
File "/home/edward/python/lib/python2.7/site-packages/feincms/admin/item_editor.py" in __init__
  63.         super(ItemEditor, self).__init__(model, admin_site)
File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py" in __init__
  182.         self.initialize_extensions()
File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py" in initialize_extensions
  188.                 extension.handle_modeladmin(self)
File "/home/edward/python/lib/python2.7/site-packages/feincms/module/extensions/translations.py" in handle_modeladmin
  212.             modeladmin.add_extension_options('language', 'translation_of')
File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py" in add_extension_options
  200.                 self.fieldsets[1][1]['fields'].extend(f)

Exception Type: AttributeError at /
Exception Value: 'tuple' object has no attribute 'extend'

If I refresh the page I get this error: There are duplicate field(s) in EntryAdmin.fieldsets

Stacktrace:

Environment:

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

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'south',
 'feincms',
 'mptt',
 'feincms.module.page',
 'feincms.module.medialibrary',
 'elephantblog',
 'core')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/home/edward/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  103.                     resolver_match = resolver.resolve(request.path_info)
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  319.             for pattern in self.url_patterns:
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  347.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/edward/python/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  342.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/edward/python/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/edward/Projects/MyProject/MyProject/urls.py" in <module>
  7. admin.autodiscover()
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/__init__.py" in autodiscover
  29.             import_module('%s.admin' % app)
File "/home/edward/python/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/edward/python/lib/python2.7/site-packages/elephantblog/admin.py" in <module>
  28. admin.site.register(models.Entry, models.EntryAdmin)
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/sites.py" in register
  98.                 validate(admin_class, model)
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/validation.py" in validate
  25.     validate_base(cls, model)
File "/home/edward/python/lib/python2.7/site-packages/django/contrib/admin/validation.py" in validate_base
  300.             raise ImproperlyConfigured('There are duplicate field(s) in %s.fieldsets' % cls.__name__)

Exception Type: ImproperlyConfigured at /
Exception Value: There are duplicate field(s) in EntryAdmin.fieldsets
simonkern commented 11 years ago

same here ;)

guetux commented 11 years ago

This might be related to https://github.com/feincms/feincms/pull/411. Is the 'datepublisher' extension activated in your setup? If yes, please try to put the extension at the end of the register_extenions call:

Entry.register_extensions('feincms.module.extensions.translations',
                          'elephantblog.extensions.blogping',
                          'feincms.module.extensions.datepublisher',
)

Hope this helps

simonkern commented 11 years ago

yep, that solved it for me. Thanks a lot !

Hedde commented 11 years ago

It would be nice if the documentation could be updated with this information :)