2 from django.utils.translation import ugettext as _
5 friendly_name = _("page")
11 def save(self, *args, **kwargs):
12 old_options = self._original_state.get('extra', None)
14 super(Page, self).save(*args, **kwargs)
16 registry = settings.STATIC_PAGE_REGISTRY
19 registry.pop(old_options.get('path', ''), None)
21 registry[self.extra['path']] = self.id
24 settings.STATIC_PAGE_REGISTRY.set_value(registry)
31 return _("[Unpublished] %s") % self.title
34 def get_absolute_url(self):
35 return ('static_page', (), {'path': self.extra['path']})
37 class Meta(Node.Meta):