Changeset 1592
- Timestamp:
- 05/26/08 12:47:58 (22 months ago)
- Location:
- trunk/pylucid
- Files:
-
- 2 modified
-
PyLucid/db/page.py (modified) (4 diffs)
-
tests/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/db/page.py
r1590 r1592 6 6 7 7 some needfull functions around the cms page navigation tree. 8 9 TODO: This stuff shoud be went into ./PyLucid/models/Page.py 8 10 9 11 Last commit info: … … 64 66 page_data = Page.objects.values( 65 67 "id", "parent", "name", "title", "shortcut" 66 ).order_by("position" )68 ).order_by("position", "name", "id") 67 69 tree = TreeGenerator(page_data) 68 70 tree.activate_all() … … 88 90 page_data = Page.objects.values( 89 91 "id", "parent", "name", "title", "shortcut" 90 ).filter(showlinks = True).order_by("position" )92 ).filter(showlinks = True).order_by("position", "name", "id") 91 93 92 94 if request.user.is_anonymous(): … … 126 128 sub_pages = Page.objects.all().filter( 127 129 parent = current_page_id, showlinks = True 128 ).order_by( 'position')130 ).order_by("position", "name", "id") 129 131 130 132 if request.user.is_anonymous(): -
trunk/pylucid/tests/__init__.py
r1591 r1592 344 344 shared method for create_link_snapshot() and link_snapshot_test() 345 345 """ 346 for page in sorted(Page.objects.all()):346 for page in Page.objects.all().order_by("position", "name", "id"): 347 347 url = page.get_absolute_url() 348 348