"The page module requires a 'Page.register_templates()' call "

447 views
Skip to first unread message

Joshua Jonah

unread,
Mar 21, 2013, 10:16:45 AM3/21/13
to django-...@googlegroups.com
I have a project all set up and works famously in 1.6.3, however upon updating to FeinCMS 1.7.4, it acts as it I didn't register anything. My models.py is perfectly formatted and now striped of everything but a dumb simple Page module. The app is firmly in the settings and has been confirmed there by using manage.py shell and some exceptions. Am I missing a step that was introduced in the newer versions or something?

WTF?

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/core/handlers/base.py", line 224, in handle_uncaught_exception
    if resolver.urlconf_module is None:
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/core/urlresolvers.py", line 323, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/var/www/vhosts/newnaturalchemistry/project/../project/urls.py", line 11, in <module>
    admin.autodiscover()
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/contrib/admin/__init__.py", line 29, in autodiscover
    import_module('%s.admin' % app)
  File "/var/www/vhosts/newnaturalchemistry/src/django/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/var/www/vhosts/newnaturalchemistry/local/lib/python2.7/site-packages/feincms/module/page/admin.py", line 23, in <module>
    "The page module requires a 'Page.register_templates()' call "
ImproperlyConfigured: The page module requires a 'Page.register_templates()' call somewhere ('Page.register_regions()' is not sufficient). If you're not using the default Page admin, maybe try FEINCMS_USE_PAGE_ADMIN=False to avoid this warning.

Joshua Jonah

unread,
Mar 21, 2013, 10:40:00 AM3/21/13
to django-...@googlegroups.com
I can do this no problem:
(newnaturalchemistry)joshua@nctools:/var/www/vhosts/newnaturalchemistry$ pro*/manage.py shell
Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings
>>> settings.INSTALLED_APPS
('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.humanize', 'pages', 'registration', 'pagination', 'captcha', 'contact', 'mptt', 'feincms', 'feincms.module.page', 'feincms.module.medialibrary', 'elephantblog', 'products', 'problems', 'haystack', 'legacy', 'pagedown', 'accounts', 'dealer')
>>>
>>> import pages
>>> from pages import models
>>> models
<module 'pages.models' from '/
var/www/vhosts/newnaturalchemistry/apps/pages/models.pyc'>
>>> models.Page
<class '
feincms.module.page.models.Page'>
>>> dir(models.Page)
['
DoesNotExist', 'Meta', 'MultipleObjectsReturned', 'TEMPLATES_CHOICES', 'TEMPLATE_CHOICES', '__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__metaclass__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__unicode__', '__weakref__', '_base_manager', '_cached_django_content_type', '_create_content_base', '_default_manager', '_deferred', '_django_content_type', '_feincms_all_regions', '_feincms_content_model', '_feincms_content_types', '_feincms_content_types_with_finalize', '_feincms_content_types_with_process', '_feincms_extensions', '_feincms_templates', '_get_FIELD_display', '_get_next_or_previous_by_FIELD', '_get_next_or_previous_in_order', '_get_pk_val', '_get_unique_checks', '_is_saved', '_meta', '_mptt_meta', '_mpttfield', '_needs_content_types', '_needs_templates', '_perform_date_checks', '_perform_unique_checks', '_set_pk_val', '_tree_manager', 'applicationcontent_set', 'are_ancestors_active', 'cache_key', 'cache_key_components', 'children', 'clean', 'clean_fields', 'contactformcontent_set', 'content', 'content_proxy_class', 'content_type_for', 'copy_content_from', 'create_content_type', 'date_error_message', 'delete', 'etag', 'feincms_item_editor_context_processors', 'feincms_item_editor_includes', 'finalize_response', 'full_clean', 'get_absolute_url', 'get_ancestors', 'get_children', 'get_descendant_count', 'get_descendants', 'get_leafnodes', 'get_level', 'get_navigation_url', 'get_next_sibling', 'get_previous_sibling', 'get_redirect_to_target', 'get_root', 'get_siblings', 'insert_at', 'is_active', 'is_ancestor_of', 'is_child_node', 'is_descendant_of', 'is_leaf_node', 'is_root_node', 'last_modified', 'markdowncontent_set', 'mediafilecontent_set', 'move_to', 'objects', 'page_page_symlinks', 'parent', 'path_to_cache_key', 'pk', 'prepare_database_save', 'productscrollercontent_set', 'register_extension', 'register_extensions', 'register_regions', 'register_request_processor', 'register_response_processor', 'register_templates', 'register_with_reversion', 'replace_content_with', 'request_processors', 'response_processors', 'save', 'save_base', 'serializable_value', 'setup_request', 'short_title', 'symlinked_page', 'template', 'tree', 'unique_error_message', 'validate_unique']
>>>
 

Like, it works, but feincms doesnt want to register. My models is one Page.register_templates() call.

Martin J. Laubach

unread,
Mar 21, 2013, 7:35:28 PM3/21/13
to django-...@googlegroups.com
That error is usually some exception that gets raised somewhere during setup -- FeinCMS does seem to swallow some exceptions during initialisation unfortunately.

Павел К

unread,
Jul 4, 2013, 11:45:18 AM7/4/13
to django-...@googlegroups.com
i resolved this. you need to create new application in your project, and add it into INSTALLED_APPS


четверг, 21 марта 2013 г., 18:16:45 UTC+4 пользователь Joshua Jonah написал:
Reply all
Reply to author
Forward
0 new messages