Django-cmsでapphookpageをスクリプトで挿入
するには
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,
login_required=True, limit_visibility_in_menu=1)
pageTop.save()
#cms_title ja
title_ja = Title(page=pageTop, language=settings.LANGUAGES[0][0],
slug='alumni', title='同窓会', application_urls='AccountsApphook')
title_ja.save()
#cms_title en
title_en = Title(page=pageTop, language=settings.LANGUAGES[1][0],
slug='alumni-en', title='Alumni', application_urls='AccountsApphook')
title_en.save()
0 件のコメント:
コメントを投稿