Permalink
Browse files

Fix Negative indexing is not supported bug in page changelist, makes …

…djangoCMS mptt 0.5.2 compatible -- refs #1099
  • Loading branch information...
1 parent c69f7d5 commit ff8e762cdead4ae97effb8df9537b9ce7b2ef8e7 centralniak committed May 17, 2012
Showing with 7 additions and 4 deletions.
  1. +2 −3 cms/admin/change_list.py
  2. +1 −1 setup.py
  3. +1 −0 tests/buildout.cfg
  4. +1 −0 tests/django-12.cfg
  5. +1 −0 tests/django-13.cfg
  6. +1 −0 tests/django-trunk.cfg
View
@@ -191,11 +191,10 @@ def set_items(self, request):
page._has_moderator_state_chache = page.pk in pagemoderator_states_id_set
if page.root_node or self.is_filtered():
+ # page.last is used only in the template to ease output of embedded <ul> lists
page.last = True
if len(children):
- # TODO: WTF!?!
- # The last one is not the last... wait, what?
- children[-1].last = False
+ children[children.count() - 1].last = False
page.menu_level = 0
root_pages.append(page)
if page.parent_id:
View
@@ -32,7 +32,7 @@
'django-classy-tags>=0.3.4.1',
'south>=0.7.2',
'html5lib',
- 'django-mptt>=0.4.2',
+ 'django-mptt==0.5.2',
'django-sekizai>=0.4.2',
],
packages=find_packages(exclude=["project","project.*"]),
View
@@ -39,3 +39,4 @@ coverage = 3.4
unittest-xml-reporting = 1.0.3
django-reversion = 1.4
django = 1.2.5
+django-mptt = 0.5.2
View
@@ -7,3 +7,4 @@ coverage = 3.4
unittest-xml-reporting = 1.0.3
django-reversion = 1.4
django = 1.2.5
+django-mptt = 0.5.2
View
@@ -6,3 +6,4 @@ coverage = 3.4
unittest-xml-reporting = 1.0.3
django-reversion = 1.4
django = 1.3
+django-mptt = 0.5.2
View
@@ -14,3 +14,4 @@ urls =
coverage = 3.4
unittest-xml-reporting = 1.0.3
django-reversion = 1.4
+django-mptt = 0.5.2

0 comments on commit ff8e762

Please sign in to comment.