Skip to content

Commit

Permalink
Defining _setup_lazy_indexes.
Browse files Browse the repository at this point in the history
_setup_lazy_indexes is called but never defined?
  • Loading branch information
vinnyrose committed Jan 13, 2015
1 parent 0defdfc commit fa972bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fluent_pages/extensions/pagetypepool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from fluent_pages.models import UrlNode
from fluent_utils.load import import_apps_submodule
from .pagetypebase import PageTypePlugin
from six import itervalues
from six import itervalues, iteritems


__all__ = (
Expand Down Expand Up @@ -134,6 +134,13 @@ def _get_plugin_by_content_type(self, contenttype):
return self.plugins[name]


def _setup_lazy_indexes(self):
if self._name_for_ctype_id is None:
self._name_for_ctype_id = {}
for name, plugin_instance in iteritems(self.plugins):
self._name_for_ctype_id[plugin_instance.type_id] = name


def get_file_types(self):
"""
Return the :class:`~django.contrib.contenttypes.models.ContentType` id's
Expand Down

0 comments on commit fa972bc

Please sign in to comment.