#NEWLINE# def get_setting( name ) : #NEWLINE# #INDENT# from django.conf import settings #NEWLINE# from django.utils.translation import ugettext_lazy as _ #NEWLINE# from meta_mixin import settings as meta_settings #NEWLINE# PERMALINKS = ( ( 'full_date' , _ ( 'Full date' ) ) , ( 'short_date' , _ ( 'Year /  Month' ) ) , ( 'category' , _ ( 'Category' ) ) , ( 'slug' , _ ( 'Just slug' ) ) ) #NEWLINE# PERMALINKS_URLS = { #NEWLINE# #INDENT# 'full_date' : '^(?P<year>\\d{4})/(?P<month>\\d{1,2})/(?P<day>\\d{1,2})/(?P<slug>\\w[-\\w]*)/$' , #NEWLINE# 'short_date' : '^(?P<year>\\d{4})/(?P<month>\\d{1,2})/(?P<slug>\\w[-\\w]*)/$' , #NEWLINE# 'category' : '^(?P<category>\\w[-\\w]*)/(?P<slug>\\w[-\\w]*)/$' , #NEWLINE# 'slug' : '^(?P<slug>\\w[-\\w]*)/$' , #NEWLINE# #UNINDENT# } #NEWLINE# MENU_TYPES = ( ( MENU_TYPE_COMPLETE , _ ( 'Categories and posts' ) ) , ( MENU_TYPE_CATEGORIES , _ ( 'Categories only' ) ) , ( MENU_TYPE_POSTS , _ ( 'Posts only' ) ) , ( MENU_TYPE_NONE , _ ( 'None' ) ) ) #NEWLINE# SITEMAP_CHANGEFREQ_LIST = ( ( 'always' , _ ( 'always' ) ) , ( 'hourly' , _ ( 'hourly' ) ) , ( 'daily' , _ ( 'daily' ) ) , ( 'weekly' , _ ( 'weekly' ) ) , ( 'monthly' , _ ( 'monthly' ) ) , ( 'yearly' , _ ( 'yearly' ) ) , ( 'never' , _ ( 'never' ) ) ) #NEWLINE# default = { #NEWLINE# #INDENT# 'BLOG_IMAGE_THUMBNAIL_SIZE' : getattr ( settings , 'BLOG_IMAGE_THUMBNAIL_SIZE' , { #NEWLINE# #INDENT# 'size' : '120x120' , #NEWLINE# 'crop' : True , #NEWLINE# 'upscale' : False , #NEWLINE# #UNINDENT# } ) , #NEWLINE# 'BLOG_IMAGE_FULL_SIZE' : getattr ( settings , 'BLOG_IMAGE_FULL_SIZE' , { #NEWLINE# #INDENT# 'size' : '640x120' , #NEWLINE# 'crop' : True , #NEWLINE# 'upscale' : False , #NEWLINE# #UNINDENT# } ) , #NEWLINE# 'BLOG_PAGINATION' : getattr ( settings , 'BLOG_PAGINATION' , 10 ) , #NEWLINE# 'BLOG_LATEST_POSTS' : getattr ( settings , 'BLOG_LATEST_POSTS' , 5 ) , #NEWLINE# 'BLOG_POSTS_LIST_TRUNCWORDS_COUNT' : getattr ( settings , 'BLOG_POSTS_LIST_TRUNCWORDS_COUNT' , 100 ) , #NEWLINE# 'BLOG_MENU_TYPES' : MENU_TYPES , #NEWLINE# 'BLOG_TYPE' : getattr ( settings , 'BLOG_TYPE' , 'Article' ) , #NEWLINE# 'BLOG_TYPES' : meta_settings . OBJECT_TYPES , #NEWLINE# 'BLOG_FB_TYPE' : getattr ( settings , 'BLOG_FB_TYPE' , 'Article' ) , #NEWLINE# 'BLOG_FB_TYPES' : getattr ( settings , 'BLOG_FB_TYPES' , meta_settings . FB_TYPES ) , #NEWLINE# 'BLOG_FB_APPID' : getattr ( settings , 'BLOG_FB_APPID' , meta_settings . FB_APPID ) , #NEWLINE# 'BLOG_FB_PROFILE_ID' : getattr ( settings , 'BLOG_FB_PROFILE_ID' , meta_settings . FB_PROFILE_ID ) , #NEWLINE# 'BLOG_FB_PUBLISHER' : getattr ( settings , 'BLOG_FB_PUBLISHER' , meta_settings . FB_PUBLISHER ) , #NEWLINE# 'BLOG_FB_AUTHOR_URL' : getattr ( settings , 'BLOG_FB_AUTHOR_URL' , 'get_author_url' ) , #NEWLINE# 'BLOG_FB_AUTHOR' : getattr ( settings , 'BLOG_FB_AUTHOR' , 'get_author_name' ) , #NEWLINE# 'BLOG_TWITTER_TYPE' : getattr ( settings , 'BLOG_TWITTER_TYPE' , 'summary' ) , #NEWLINE# 'BLOG_TWITTER_TYPES' : getattr ( settings , 'BLOG_TWITTER_TYPES' , meta_settings . TWITTER_TYPES ) , #NEWLINE# 'BLOG_TWITTER_SITE' : getattr ( settings , 'BLOG_TWITTER_SITE' , meta_settings . TWITTER_SITE ) , #NEWLINE# 'BLOG_TWITTER_AUTHOR' : getattr ( settings , 'BLOG_TWITTER_AUTHOR' , 'get_author_twitter' ) , #NEWLINE# 'BLOG_GPLUS_TYPE' : getattr ( settings , 'BLOG_GPLUS_TYPE' , 'Blog' ) , #NEWLINE# 'BLOG_GPLUS_TYPES' : getattr ( settings , 'BLOG_GPLUS_TYPES' , meta_settings . GPLUS_TYPES ) , #NEWLINE# 'BLOG_GPLUS_AUTHOR' : getattr ( settings , 'BLOG_GPLUS_AUTHOR' , 'get_author_gplus' ) , #NEWLINE# 'BLOG_ENABLE_COMMENTS' : getattr ( settings , 'BLOG_ENABLE_COMMENTS' , True ) , #NEWLINE# 'BLOG_USE_ABSTRACT' : getattr ( settings , 'BLOG_USE_ABSTRACT' , True ) , #NEWLINE# 'BLOG_USE_PLACEHOLDER' : getattr ( settings , 'BLOG_USE_PLACEHOLDER' , True ) , #NEWLINE# 'BLOG_MULTISITE' : getattr ( settings , 'BLOG_MULTISITE' , True ) , #NEWLINE# 'BLOG_AUTHOR_DEFAULT' : getattr ( settings , 'BLOG_AUTHOR_DEFAULT' , True ) , #NEWLINE# 'BLOG_DEFAULT_PUBLISHED' : getattr ( settings , 'BLOG_DEFAULT_PUBLISHED' , False ) , #NEWLINE# 'BLOG_ADMIN_POST_FIELDSET_FILTER' : getattr ( settings , 'BLOG_ADMIN_POST_FIELDSET_FILTER' , False ) , #NEWLINE# 'BLOG_AVAILABLE_PERMALINK_STYLES' : getattr ( settings , 'BLOG_AVAILABLE_PERMALINK_STYLES' , PERMALINKS ) , #NEWLINE# 'BLOG_PERMALINK_URLS' : getattr ( settings , 'BLOG_PERMALINK_URLS' , PERMALINKS_URLS ) , #NEWLINE# 'BLOG_DEFAULT_OBJECT_NAME' : getattr ( settings , 'BLOG_DEFAULT_OBJECT_NAME' , 'Article' ) , #NEWLINE# 'BLOG_AUTO_SETUP' : getattr ( settings , 'BLOG_AUTO_SETUP' , True ) , #NEWLINE# 'BLOG_AUTO_HOME_TITLE' : getattr ( settings , 'BLOG_AUTO_HOME_TITLE' , 'Home' ) , #NEWLINE# 'BLOG_AUTO_BLOG_TITLE' : getattr ( settings , 'BLOG_AUTO_BLOG_TITLE' , 'Blog' ) , #NEWLINE# 'BLOG_AUTO_APP_TITLE' : getattr ( settings , 'BLOG_AUTO_APP_TITLE' , 'Blog' ) , #NEWLINE# 'BLOG_AUTO_NAMESPACE' : getattr ( settings , 'BLOG_AUTO_NAMESPACE' , 'Blog' ) , #NEWLINE# 'BLOG_SITEMAP_PRIORITY_DEFAULT' : getattr ( settings , 'BLOG_SITEMAP_PRIORITY_DEFAULT' , '0.5' ) , #NEWLINE# 'BLOG_SITEMAP_CHANGEFREQ' : getattr ( settings , 'BLOG_SITEMAP_CHANGEFREQ' , PERMALINKS ) , #NEWLINE# 'BLOG_SITEMAP_CHANGEFREQ_DEFAULT' : getattr ( settings , 'BLOG_SITEMAP_CHANGEFREQ_DEFAULT' , 'monthly' ) , #NEWLINE# 'BLOG_ENABLE_SEARCH' : getattr ( settings , 'BLOG_ENABLE_SEARCH' , True ) , #NEWLINE# 'BLOG_CURRENT_POST_IDENTIFIER' : getattr ( settings , 'BLOG_CURRENT_POST_IDENTIFIER' , 'djangocms_post_current' ) , #NEWLINE# 'BLOG_CURRENT_NAMESPACE' : getattr ( settings , 'BLOG_CURRENT_NAMESPACE' , 'djangocms_post_current_config' ) , #NEWLINE# 'BLOG_ENABLE_THROUGH_TOOLBAR_MENU' : getattr ( settings , 'BLOG_ENABLE_THROUGH_TOOLBAR_MENU' , False ) , #NEWLINE# 'BLOG_PLUGIN_MODULE_NAME' : getattr ( settings , 'BLOG_PLUGIN_MODULE_NAME' , _ ( 'Blog' ) ) , #NEWLINE# 'BLOG_LATEST_ENTRIES_PLUGIN_NAME' : getattr ( settings , 'BLOG_LATEST_ENTRIES_PLUGIN_NAME' , _ ( 'Latest Blog Articles' ) ) , #NEWLINE# 'BLOG_AUTHOR_POSTS_PLUGIN_NAME' : getattr ( settings , 'BLOG_AUTHOR_POSTS_PLUGIN_NAME' , _ ( 'Author Blog Articles' ) ) , #NEWLINE# 'BLOG_TAGS_PLUGIN_NAME' : getattr ( settings , 'BLOG_TAGS_PLUGIN_NAME' , _ ( 'Tags' ) ) , #NEWLINE# 'BLOG_CATEGORY_PLUGIN_NAME' : getattr ( settings , 'BLOG_CATEGORY_PLUGIN_NAME' , _ ( 'Categories' ) ) , #NEWLINE# 'BLOG_ARCHIVE_PLUGIN_NAME' : getattr ( settings , 'BLOG_ARCHIVE_PLUGIN_NAME' , _ ( 'Archive' ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# return default [ ( 'BLOG_%s' % name ) ]