feincms / feincms-elephantblog

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

AttributeError: type object 'Entry' has no attribute 'register_response_processor' #28

Closed EdwardIII closed 11 years ago

EdwardIII commented 11 years ago

I've taken the examples from the doc: http://feincms-elephantblog.readthedocs.org/en/latest/installation.html

When I try to run feincms-elephantblog 0.3.0 with feincms 1.7.2 I'm getting the error "AttributeError: type object 'Entry' has no attribute 'register_response_processor'".

Is this to do with the depreciation warning here? https://github.com/feincms/feincms/blob/master/docs/deprecation.rst#id2

Request and response processors have to be imported from :mod:`feincms.module.page.processors`. Additionally, they must be registered individually by using register_request_processor and register_response_processor.

Here's the stacktrace:

]$ python manage.py runserver
Validating models...

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x1150190>>
Traceback (most recent call last):
  File "/home/edward/python/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run
    self.validate(display_num_errors=True)
  File "/home/edward/python/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/home/edward/python/lib/python2.7/site-packages/django/core/management/validation.py", line 30, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/home/edward/python/lib/python2.7/site-packages/django/db/models/loading.py", line 158, in get_app_errors
    self._populate()
  File "/home/edward/python/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name, True)
  File "/home/edward/python/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
    models = import_module('.models', app_name)
  File "/home/edward/python/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/edward/Projects/MyProject/core/models.py", line 35, in <module>
    'elephantblog.extensions.blogping',
  File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py", line 107, in register_extensions
    cls._extensions.append(LegacyExtension(cls, extension=extension))
  File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py", line 119, in __init__
    self.handle_model()
  File "/home/edward/python/lib/python2.7/site-packages/feincms/extensions.py", line 148, in handle_model
    self.extension(self.model, self)
  File "/home/edward/python/lib/python2.7/site-packages/feincms/module/extensions/datepublisher.py", line 94, in register
    cls.register_response_processor(datepublisher_response_processor)
AttributeError: type object 'Entry' has no attribute 'register_response_processor'
ebrelsford commented 11 years ago

I'm receiving the same error. I've added module.mixins.ContentModelMixin to Entry, but I'm not certain that's the most appropriate response! Would be nice if elephantblog would work against the current version of feincms.

matthiask commented 11 years ago

Thanks for the reports. We'll make a compatible release in the next few days.

Adding the ContentModelMixin is a good quick fix. You can also take a look at the pu branch in my fork you want.

Thanks!

matthiask commented 11 years ago

Related pull request here: https://github.com/feincms/feincms-elephantblog/pull/29

matthiask commented 11 years ago

Fixed by merging #29.