fix error in page filtering; sectionitems are now directly children of section

This commit is contained in:
bkfox
2016-11-15 12:27:36 +01:00
parent b8d6c435d2
commit f183669c04
3 changed files with 26 additions and 52 deletions

View File

@ -29,7 +29,7 @@ def station_post_saved(sender, instance, created, *args, **kwargs):
body = _(
'If you see this page, then Aircox is running for the station '
'{station.name}. You might want to change it to a better one. '
),
).format(station = instance),
)
root_page.add_child(instance=homepage)
@ -75,13 +75,14 @@ def station_post_saved(sender, instance, created, *args, **kwargs):
homepage.add_child(instance = programs)
section = sections.Section(
name = _('Programs List'),
name = _('Programs'),
position = 'post_content',
page = programs,
)
section.save();
section.add_item(sections.SectionList(
count = 15,
title = _('Programs'),
url_text = _('All programs'),
model = ContentType.objects.get_for_model(models.ProgramPage),
related = programs,