site = Site.objects.get_current()
#cms_page
pageTop = Page(site=Site.objects.get_current(), navigation_extenders='',
template='body1Column.html', published=True,
publisher_state=1, publisher_is_draft=True)
pageTop.save()
#cms_title ja
title_ja = Title(page=pageTop, language=settings.LANGUAGES[0][0],
slug='news-top-page', title='ニューストップページ')
title_ja.save()
#cms_title en
title_en = Title(page=pageTop, language=settings.LANGUAGES[1][0],
slug='news-top-page-en', title='News Top Page')
title_en.save()
#0
page = Page(parent=pageTop, site=Site.objects.get_current(), navigation_extenders='',
template='body1Column.html', published=True,
publisher_state=1, publisher_is_draft=True)
page.save()
#cms_title ja
title_ja = Title(page=page, language=settings.LANGUAGES[0][0],
slug='news-top-page0', title='ニュースページ0')
title_ja.save()
#cms_title en
title_en = Title(page=page, language=settings.LANGUAGES[1][0],
slug='news-top-page0-en', title='News Page0')
title_en.save()
#1
page = Page(parent=pageTop, site=Site.objects.get_current(), navigation_extenders='',
template='body1Column.html', published=True,
publisher_state=1, publisher_is_draft=True)
page.save()
#cms_title ja
title_ja = Title(page=page, language=settings.LANGUAGES[0][0],
slug='news-top-page1', title='ニュースページ1')
title_ja.save()
#cms_title en
title_en = Title(page=page, language=settings.LANGUAGES[1][0],
slug='news-top-page1-en', title='News Page1')
title_en.save()
#2
page = Page(parent=pageTop, site=Site.objects.get_current(), navigation_extenders='',
template='body1Column.html', published=True,
publisher_state=1, publisher_is_draft=True)
page.save()
#cms_title ja
title_ja = Title(page=page, language=settings.LANGUAGES[0][0],
slug='news-top-page2', title='ニュースページ2')
title_ja.save()
#cms_title en
title_en = Title(page=page, language=settings.LANGUAGES[1][0],
slug='news-top-page2-en', title='News Page2')
title_en.save()
#3
page = Page(parent=pageTop, site=Site.objects.get_current(), navigation_extenders='',
template='body1Column.html', published=True,
publisher_state=1, publisher_is_draft=True)
page.save()
#cms_title ja
title_ja = Title(page=page, language=settings.LANGUAGES[0][0],
slug='news-top-page3', title='ニュースページ3')
title_ja.save()
#cms_title en
title_en = Title(page=page, language=settings.LANGUAGES[1][0],
slug='news-top-page3-en', title='News Page3')
title_en.save()
2010年8月29日日曜日
Django-cmsで子pageをスクリプトで挿入
するには
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿