Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Docs: fix docs/extending_cms/extending_examples.rst #961

Merged
merged 3 commits into from

3 participants

@applecat

No description provided.

docs/extending_cms/app_integration.rst
@@ -282,7 +282,13 @@ We would now create a menu out of these categories::
def get_nodes(self, request):
nodes = []
for category in Category.objects.all().order_by("tree_id", "lft"):
- nodes.append(NavigationNode(category.name, category.pk, category.parent_id))
+ nodes = NavigationNode(

There seems to be an error here that you've carried over: the variable is called nodes so in each iteration it'll override the declaration of nodes as a list, and will never append correctly.

thanx. I fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ojii ojii merged commit 12fd36d into divio:develop
@ojii
Collaborator

thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 19, 2011
  1. @applecat
Commits on Aug 23, 2011
  1. @applecat
Commits on Aug 25, 2011
  1. @applecat
This page is out of date. Refresh to see the latest.
View
8 docs/extending_cms/app_integration.rst
@@ -282,7 +282,13 @@ We would now create a menu out of these categories::
def get_nodes(self, request):
nodes = []
for category in Category.objects.all().order_by("tree_id", "lft"):
- nodes.append(NavigationNode(category.name, category.pk, category.parent_id))
+ node = NavigationNode(
+ category.name,
+ category.get_absolute_url(),
+ category.pk,
+ category.parent_id
+ )
+ nodes.append(node)
return nodes
menu_pool.register_menu(CategoryMenu)
View
2  docs/extending_cms/extending_examples.rst
@@ -252,7 +252,7 @@ So open your ``cms_apps.py`` and write::
class PollsApp(CMSApp):
name = _("Poll App")
urls = ["polls.urls"]
- menu = [PollsMenu] # attach a CMSAttachMenu to this apphook.
+ menus = [PollsMenu] # attach a CMSAttachMenu to this apphook.
apphook_pool.register(PollsApp)
Something went wrong with that request. Please try again.