X-Git-Url: https://code.grnet.gr/git/snf-cloudcms/blobdiff_plain/7c98163233e27b89acd261028aeb6819a37a93de..ab055e9410e941079c2efe33147be048f280c27b:/cloudcms/cms.py diff --git a/cloudcms/cms.py b/cloudcms/cms.py index c275e19..4f2b091 100644 --- a/cloudcms/cms.py +++ b/cloudcms/cms.py @@ -57,6 +57,7 @@ from feincms.content.richtext.models import RichTextContent from cloudcmsresources.models import ResourcesList from cloudcms.content import * + Page.register_extensions( 'changedate', 'datepublisher', @@ -65,23 +66,15 @@ Page.register_extensions( 'symlinks', 'navigation', 'sites', - 'titles' + 'titles', + 'featured', ) + # Feincms Page templates declaration TEMPLATES = [{ - 'key': 'basic', - 'title': 'Basic 2 columns template', - 'path': 'cms/pages/page.html', - 'regions': ( - ('main', 'Main region'), - ('sidebar', 'Sidebar', 'inherited'), - ('bottom', 'Bottom section', 'inherited'), - ), - }, - { 'key': 'twocolwide', - 'title': 'Basic 2 columns template (wider)', + 'title': 'Basic 2 columns template (left wider)', 'path': 'cms/pages/twocolwide.html', 'regions': ( ('main', 'Main region'), @@ -89,22 +82,24 @@ TEMPLATES = [{ ), }, { - 'key': 'intro', - 'title': 'Intro page Template', - 'path': 'cms/pages/intro.html', + 'key': 'singlecol', + 'title': 'Basic (Top 1 col, Bottom 2 cols)', + 'path': 'cms/pages/basic1top2bottom.html', 'regions': ( - ('main', 'Main region'), - ('sidebar', 'Sidebar', 'inherited'), - ('bottom', 'Bottom section', 'inherited'), + ('top', 'Top region'), + ('bottom_left', 'Bottom left region'), + ('bottom_right', 'Bottom right region'), ), }, - { - 'key': 'singlecol', - 'title': 'Basic 1 column template', - 'path': 'cms/pages/onecol.html', + { + 'key': 'basic2top2bottom', + 'title': 'Basic (Top 2 cols, Bottom 2 cols)', + 'path': 'cms/pages/basic2top2bottom.html', 'regions': ( - ('main', 'Main region'), - ('bottom', 'Bottom region'), + ('top_left', 'Top left region'), + ('top_right', 'Top right region'), + ('bottom_left', 'Bottom left region'), + ('bottom_right', 'Bottom right region'), ), }, { @@ -117,12 +112,23 @@ TEMPLATES = [{ ), }, { + 'key': 'userguide', + 'title': 'Userguide template', + 'path': 'cms/pages/userguide.html', + 'regions': ( + ('top', 'Top region'), + ('bottom_left', 'Bottom left region'), + ('bottom_right', 'Bottom right region'), + ), + }, + { 'key': 'faq', 'title': 'FAQ\'s template', 'path': 'cms/pages/faq.html', 'regions': ( - ('main', 'Main region'), - ('sidebar', 'Sidebar', 'inherited'), + ('top', 'Top region'), + ('bottom_left', 'Bottom left region'), + ('bottom_right', 'Bottom right region'), ), }, { @@ -133,11 +139,25 @@ TEMPLATES = [{ ('main', 'Main region'), ), }, + { + 'key': 'topwidetwocol', + 'title': 'Basic (Top 1 col, Middle 2 cols, Bottom 2 cols)', + 'path': 'cms/pages/topwidetwocol.html', + 'regions': ( + ('top', 'Top region'), + ('middle_left', 'Middle left region'), + ('middle_right', 'Middle right region'), + ('bottom_left', 'Bottom left region'), + ('bottom_right', 'Bottom right region'), + ), + }, ] # register templates map(Page.register_templates, TEMPLATES) +Page.create_content_type(TextileContent) +Page.create_content_type(IntroBlock) Page.create_content_type(RichTextContent) Page.create_content_type(RawContent) Page.create_content_type(SectionContent, TYPE_CHOICES=(('block', 'Block'),)) @@ -146,6 +166,7 @@ Page.create_content_type(TwitterFeed) Page.create_content_type(VideoContent) Page.create_content_type(VideoSection) Page.create_content_type(IntroButton) +Page.create_content_type(ClientDownload) Page.create_content_type(ImageContent, POSITION_CHOICES=( ('default', 'Default position'), )) @@ -155,13 +176,15 @@ Page.create_content_type(MediaFileContent, TYPE_CHOICES=( )) Page.create_content_type(ApplicationContent, APPLICATIONS=( ('cloudcmsblog', 'Cloud blog', {'urls': 'cloudcmsblog.urls'}), - ('cloudcmsfaq', 'Cloud FAQ', {'urls': 'cloudcmsfaq.urls'}),)) + ('cloudcmsfaq', 'Cloud FAQ', {'urls': 'cloudcmsfaq.urls'}), + ('cloudcmsguide', 'Cloud user guide', {'urls': 'cloudcmsguide.urls'}),) +) # cloudcms specific content registration Page.create_content_type(LoginForm) Page.create_content_type(AboutBlock) Page.create_content_type(ResourcesList) - +Page.create_content_type(BlockColor) # Extra cms applications EXTRA_CONTENT_MODELS = [] @@ -175,6 +198,10 @@ if 'cloudcmsfaq' in settings.INSTALLED_APPS: from cloudcmsfaq.models import Question EXTRA_CONTENT_MODELS.append(Question) +if 'cloudcmsguide' in settings.INSTALLED_APPS: + from cloudcmsguide.models import UserGuideEntry + EXTRA_CONTENT_MODELS.append(UserGuideEntry) + for model in EXTRA_CONTENT_MODELS: # Feincms specific registrations for our blog entry model model.register_regions( @@ -189,3 +216,6 @@ for model in EXTRA_CONTENT_MODELS: ('default', 'Default position'), )) + +Page.create_content_type(StatsBlock) +Page.create_content_type(IntroVideo) \ No newline at end of file