def get_nodes(self, request): """Return menu's node for objecttypes""" nodes = [] nodes.append(NavigationNode(_('Objecttypes'), reverse('objectapp_Objecttype_list'), 'objecttypes')) for Objecttype in Objecttype.objects.all(): nodes.append(NavigationNode(Objecttype.title, Objecttype.get_absolute_url(), Objecttype.pk, 'objecttypes')) return nodes
def get_nodes(self, request): """Return menu's node for objecttypes""" nodes = [] nodes.append(NavigationNode(_('Objecttypes'), reverse('objectapp_Objecttype_list'), 'objecttypes')) for Objecttype in Objecttype.objects.all(): nodes.append(NavigationNode(Objecttype.title, Objecttype.get_absolute_url(), Objecttype.pk, 'objecttypes')) return nodes
def Objecttype_structure(Objecttype, site): """A Objecttype structure""" return { "description": Objecttype.title, "htmlUrl": "%s://%s%s" % (PROTOCOL, site.domain, Objecttype.get_absolute_url()), "rssUrl": "%s://%s%s" % (PROTOCOL, site.domain, reverse("objectapp_Objecttype_feed", args=[Objecttype.tree_path])), # Useful Wordpress Extensions "ObjecttypeId": Objecttype.pk, "parentId": Objecttype.parent and Objecttype.parent.pk or 0, "ObjecttypeDescription": Objecttype.description, "ObjecttypeName": Objecttype.title, }
def Objecttype_structure(Objecttype, site): """A Objecttype structure""" return {'description': Objecttype.title, 'htmlUrl': '%s://%s%s' % ( PROTOCOL, site.domain, Objecttype.get_absolute_url()), 'rssUrl': '%s://%s%s' % ( PROTOCOL, site.domain, reverse('objectapp_Objecttype_feed', args=[Objecttype.tree_path])), # Useful Wordpress Extensions 'ObjecttypeId': Objecttype.pk, 'parentId': Objecttype.parent and Objecttype.parent.pk or 0, 'ObjecttypeDescription': Objecttype.description, 'ObjecttypeName': Objecttype.title}