X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/c79f6c48cae9411acf3f413b25d942df34f7719f..2e6ad400272d774b72f682bc9f843379b03382b2:/philo/contrib/shipherd/models.py diff --git a/philo/contrib/shipherd/models.py b/philo/contrib/shipherd/models.py index a520fbe..429faaa 100644 --- a/philo/contrib/shipherd/models.py +++ b/philo/contrib/shipherd/models.py @@ -7,7 +7,7 @@ from django.core.validators import RegexValidator, MinValueValidator from django.db import models from django.forms.models import model_to_dict -from philo.models.base import TreeEntity, TreeManager, Entity +from philo.models.base import TreeEntity, TreeEntityManager, Entity from philo.models.nodes import Node, TargetURLModel @@ -224,7 +224,7 @@ class Navigation(Entity): unique_together = ('node', 'key') -class NavigationItemManager(TreeManager): +class NavigationItemManager(TreeEntityManager): use_for_related = True def get_query_set(self): @@ -249,8 +249,9 @@ class NavigationItem(TreeEntity, TargetURLModel): self._initial_data = model_to_dict(self) self._is_cached = False - def __unicode__(self): - return self.get_path(field='text', pathsep=u' › ') + def get_path(self, root=None, pathsep=u' › ', field='text'): + return super(NavigationItem, self).get_path(root, pathsep, field) + path = property(get_path) def clean(self): super(NavigationItem, self).clean()