diff --git a/frappe/templates/website_group/post.py b/frappe/templates/website_group/post.py index cba44dc1f8..93fbe6221b 100644 --- a/frappe/templates/website_group/post.py +++ b/frappe/templates/website_group/post.py @@ -132,8 +132,7 @@ def save_post(post, content, picture=None, picture_name=None, title=None, def process_picture(post, picture_name, picture): from frappe.templates.generators.website_group import clear_cache - file_data = save_file(picture_name, picture, "Post", post.name, decode=True) - post.picture_url = file_data.file_name or file_data.file_url + post.picture_url = save_file(picture_name, picture, "Post", post.name, decode=True).file_url frappe.db.set_value("Post", post.name, "picture_url", post.picture_url) clear_cache(website_group=post.website_group) diff --git a/frappe/website/doctype/website_settings/website_settings.json b/frappe/website/doctype/website_settings/website_settings.json index effd71d009..8f9799645d 100644 --- a/frappe/website/doctype/website_settings/website_settings.json +++ b/frappe/website/doctype/website_settings/website_settings.json @@ -1,251 +1,251 @@ { - "allow_attach": 1, - "creation": "2013-04-30 12:58:46.000000", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Other", + "allow_attach": 1, + "creation": "2013-04-30 12:58:46.000000", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Other", "fields": [ { - "fieldname": "sb0", - "fieldtype": "Section Break", - "label": "Landing Page", + "fieldname": "sb0", + "fieldtype": "Section Break", + "label": "Landing Page", "permlevel": 0 - }, + }, { - "description": "Link that is the website home page. Standard Links (index, login, products, blog, about, contact)", - "fieldname": "home_page", - "fieldtype": "Link", - "label": "Home Page", - "options": "Website Route", - "permlevel": 0, + "description": "Link that is the website home page. Standard Links (index, login, products, blog, about, contact)", + "fieldname": "home_page", + "fieldtype": "Link", + "label": "Home Page", + "options": "Website Route", + "permlevel": 0, "reqd": 0 - }, + }, { - "description": "The name of your company / website as you want to appear on browser title bar. All pages will have this as the prefix to the title.", - "fieldname": "title_prefix", - "fieldtype": "Data", - "label": "Title Prefix", + "description": "The name of your company / website as you want to appear on browser title bar. All pages will have this as the prefix to the title.", + "fieldname": "title_prefix", + "fieldtype": "Data", + "label": "Title Prefix", "permlevel": 0 - }, + }, { - "fieldname": "cb4", - "fieldtype": "Column Break", + "fieldname": "cb4", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "description": "If checked, the Home page will be the default Item Group for the website.", - "fieldname": "home_page_is_products", - "fieldtype": "Check", - "label": "Home Page is Products", + "description": "If checked, the Home page will be the default Item Group for the website.", + "fieldname": "home_page_is_products", + "fieldtype": "Check", + "label": "Home Page is Products", "permlevel": 0 - }, + }, { - "description": "Add a banner to the site. (small banners are usually good)", - "fieldname": "banner", - "fieldtype": "Section Break", - "label": "Banner", + "description": "Add a banner to the site. (small banners are usually good)", + "fieldname": "banner", + "fieldtype": "Section Break", + "label": "Banner", "permlevel": 0 - }, + }, { - "description": "Select an image of approx width 150px with a transparent background for best results.", - "fieldname": "banner_image", - "fieldtype": "Select", - "label": "Banner Image", - "options": "attach_files:", + "description": "Select an image of approx width 150px with a transparent background for best results.", + "fieldname": "banner_image", + "fieldtype": "Select", + "label": "Banner Image", + "options": "attach_files:", "permlevel": 0 - }, + }, { - "fieldname": "set_banner_from_image", - "fieldtype": "Button", - "label": "Set Banner from Image", + "fieldname": "set_banner_from_image", + "fieldtype": "Button", + "label": "Set Banner from Image", "permlevel": 0 - }, + }, { - "description": "Banner is above the Top Menu Bar.", - "fieldname": "banner_html", - "fieldtype": "Small Text", - "label": "Banner HTML", + "description": "Banner is above the Top Menu Bar.", + "fieldname": "banner_html", + "fieldtype": "Small Text", + "label": "Banner HTML", "permlevel": 0 - }, + }, { - "description": "Menu items in the Top Bar. For setting the color of the Top Bar, go to Style Settings", - "fieldname": "top_bar", - "fieldtype": "Section Break", - "label": "Top Bar", + "description": "Menu items in the Top Bar. For setting the color of the Top Bar, go to Style Settings", + "fieldname": "top_bar", + "fieldtype": "Section Break", + "label": "Top Bar", "permlevel": 0 - }, + }, { - "description": "Brand is what appears on the top-right of the toolbar. If it is an image, make sure it\nhas a transparent background and use the <img /> tag. Keep size as 200px x 30px", - "fieldname": "brand_html", - "fieldtype": "Small Text", - "label": "Brand HTML", + "description": "Brand is what appears on the top-left of the toolbar. If it is an image, make sure it\nhas a transparent background and use the <img /> tag. Keep size as 200px x 30px", + "fieldname": "brand_html", + "fieldtype": "Small Text", + "label": "Brand HTML", "permlevel": 0 - }, + }, { - "fieldname": "top_bar_items", - "fieldtype": "Table", - "label": "Top Bar Items", - "options": "Top Bar Item", + "fieldname": "top_bar_items", + "fieldtype": "Table", + "label": "Top Bar Items", + "options": "Top Bar Item", "permlevel": 0 - }, + }, { - "description": "Sidebar Links for Home Page only", - "fieldname": "sidebar", - "fieldtype": "Section Break", - "label": "Sidebar", + "description": "Sidebar Links for Home Page only", + "fieldname": "sidebar", + "fieldtype": "Section Break", + "label": "Sidebar", "permlevel": 0 - }, + }, { - "fieldname": "sidebar_items", - "fieldtype": "Table", - "label": "Sidebar Items", - "options": "Top Bar Item", + "fieldname": "sidebar_items", + "fieldtype": "Table", + "label": "Sidebar Items", + "options": "Top Bar Item", "permlevel": 0 - }, + }, { - "fieldname": "footer", - "fieldtype": "Section Break", - "label": "Footer", + "fieldname": "footer", + "fieldtype": "Section Break", + "label": "Footer", "permlevel": 0 - }, + }, { - "description": "Address and other legal information you may want to put in the footer.", - "fieldname": "address", - "fieldtype": "Text Editor", - "label": "Address", + "description": "Address and other legal information you may want to put in the footer.", + "fieldname": "address", + "fieldtype": "Text Editor", + "label": "Address", "permlevel": 0 - }, + }, { - "fieldname": "copyright", - "fieldtype": "Data", - "label": "Copyright", + "fieldname": "copyright", + "fieldtype": "Data", + "label": "Copyright", "permlevel": 0 - }, + }, { - "fieldname": "footer_items", - "fieldtype": "Table", - "label": "Footer Items", - "options": "Top Bar Item", + "fieldname": "footer_items", + "fieldtype": "Table", + "label": "Footer Items", + "options": "Top Bar Item", "permlevel": 0 - }, + }, { - "fieldname": "integrations", - "fieldtype": "Section Break", - "label": "Integrations", + "fieldname": "integrations", + "fieldtype": "Section Break", + "label": "Integrations", "permlevel": 0 - }, + }, { - "description": "Add Google Analytics ID: eg. UA-89XXX57-1. Please search help on Google Analytics for more information.", - "fieldname": "google_analytics_id", - "fieldtype": "Data", - "label": "Google Analytics ID", + "description": "Add Google Analytics ID: eg. UA-89XXX57-1. Please search help on Google Analytics for more information.", + "fieldname": "google_analytics_id", + "fieldtype": "Data", + "label": "Google Analytics ID", "permlevel": 0 - }, + }, { - "fieldname": "column_break_17", - "fieldtype": "Column Break", + "fieldname": "column_break_17", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "google_plus_one", - "fieldtype": "Check", - "label": "Google Plus One", + "fieldname": "google_plus_one", + "fieldtype": "Check", + "label": "Google Plus One", "permlevel": 0 - }, + }, { - "fieldname": "facebook_share", - "fieldtype": "Check", - "label": "Facebook Share", + "fieldname": "facebook_share", + "fieldtype": "Check", + "label": "Facebook Share", "permlevel": 0 - }, + }, { - "fieldname": "linked_in_share", - "fieldtype": "Check", - "label": "Linked In Share", + "fieldname": "linked_in_share", + "fieldtype": "Check", + "label": "Linked In Share", "permlevel": 0 - }, + }, { - "fieldname": "twitter_share", - "fieldtype": "Check", - "label": "Twitter Share", + "fieldname": "twitter_share", + "fieldtype": "Check", + "label": "Twitter Share", "permlevel": 0 - }, + }, { - "description": "Tweet will be shared via your user account (if specified)", - "fieldname": "twitter_share_via", - "fieldtype": "Data", - "label": "Twitter Share via", + "description": "Tweet will be shared via your user account (if specified)", + "fieldname": "twitter_share_via", + "fieldtype": "Data", + "label": "Twitter Share via", "permlevel": 0 - }, + }, { - "fieldname": "misc_section", - "fieldtype": "Section Break", - "label": "Misc", + "fieldname": "misc_section", + "fieldtype": "Section Break", + "label": "Misc", "permlevel": 0 - }, + }, { - "description": "An icon file with .ico extension. Should be 16 x 16 px. Generated using a favicon generator. [favicon-generator.org]", - "fieldname": "favicon", - "fieldtype": "Select", - "label": "FavIcon", - "options": "attach_files:", + "description": "An icon file with .ico extension. Should be 16 x 16 px. Generated using a favicon generator. [favicon-generator.org]", + "fieldname": "favicon", + "fieldtype": "Select", + "label": "FavIcon", + "options": "attach_files:", "permlevel": 0 - }, + }, { - "description": "Sub-domain provided by erpnext.com", - "fieldname": "subdomain", - "fieldtype": "Text", - "label": "Subdomain", - "permlevel": 0, - "read_only": 1, + "description": "Sub-domain provided by erpnext.com", + "fieldname": "subdomain", + "fieldtype": "Text", + "label": "Subdomain", + "permlevel": 0, + "read_only": 1, "reqd": 0 - }, + }, { - "fieldname": "column_break_28", - "fieldtype": "Column Break", + "fieldname": "column_break_28", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "description": "Disable Customer Signup link in Login page", - "fieldname": "disable_signup", - "fieldtype": "Check", - "label": "Disable Signup", + "description": "Disable Customer Signup link in Login page", + "fieldname": "disable_signup", + "fieldtype": "Check", + "label": "Disable Signup", "permlevel": 0 } - ], - "icon": "icon-cog", - "idx": 1, - "issingle": 1, - "max_attachments": 10, - "modified": "2014-02-26 11:39:10.000000", - "modified_by": "Administrator", - "module": "Website", - "name": "Website Settings", - "owner": "Administrator", + ], + "icon": "icon-cog", + "idx": 1, + "issingle": 1, + "max_attachments": 10, + "modified": "2014-02-26 11:39:10.000000", + "modified_by": "Administrator", + "module": "Website", + "name": "Website Settings", + "owner": "Administrator", "permissions": [ { - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "Website Manager", - "submit": 0, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 0, + "role": "Website Manager", + "submit": 0, "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "permlevel": 1, - "read": 1, - "report": 0, - "role": "All", + }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "permlevel": 1, + "read": 1, + "report": 0, + "role": "All", "submit": 0 } ] -} \ No newline at end of file +}