From 3ffda497c9329178e437fd7d222577e248b0d608 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 18 Feb 2015 12:17:27 +0530 Subject: [PATCH 1/7] [minor] app icon should not be clickable in all applications listing --- frappe/core/page/desktop/desktop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/page/desktop/desktop.js b/frappe/core/page/desktop/desktop.js index e519a6184c..81964b4c27 100644 --- a/frappe/core/page/desktop/desktop.js +++ b/frappe/core/page/desktop/desktop.js @@ -139,7 +139,7 @@ frappe.desktop.show_all_modules = function() { module.label = __(module.label); $(repl('
\
\ - \ +
%(app_icon)s
\
\ %(label)s\ \ From f3b37df2dd593810d783d6308bc902b857dd00ad Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Feb 2015 12:24:20 +0530 Subject: [PATCH 2/7] [fix] Added unicode_literals if missing in py files --- frappe/__version__.py | 1 + frappe/api.py | 1 + frappe/app.py | 1 + frappe/config/desktop.py | 1 + frappe/config/setup.py | 1 + frappe/config/website.py | 1 + frappe/core/doctype/communication/test_communication.py | 1 + frappe/core/doctype/doctype/boilerplate/test_controller.py | 1 + frappe/core/doctype/email_alert/test_email_alert.py | 1 + frappe/core/doctype/event/test_event.py | 1 + frappe/core/doctype/letter_head/test_letter_head.py | 1 + frappe/core/doctype/page/test_page.py | 1 + frappe/core/doctype/print_format/test_print_format.py | 1 + frappe/core/doctype/role/test_role.py | 1 + frappe/core/doctype/user/test_user.py | 1 + frappe/core/doctype/version/test_version.py | 1 + frappe/core/doctype/workflow_state/test_workflow_state.py | 1 + frappe/core/page/data_import_tool/test_exporter_fixtures.py | 1 + frappe/hooks.py | 1 + frappe/patches/v4_0/add_delete_permission.py | 1 + frappe/patches/v4_0/remove_index_sitemap.py | 1 + frappe/patches/v4_0/rename_profile_to_user.py | 1 + frappe/patches/v4_0/rename_sitemap_to_route.py | 1 + frappe/patches/v4_0/set_todo_checked_as_closed.py | 1 + frappe/patches/v4_0/set_website_route_idx.py | 1 + frappe/patches/v4_0/update_datetime.py | 1 + frappe/patches/v4_0/webnotes_to_frappe.py | 1 + frappe/patches/v4_2/refactor_website_routing.py | 1 + frappe/patches/v4_2/set_assign_in_doc.py | 1 + frappe/setup_logging.py | 1 + frappe/templates/includes/comments.py | 1 + frappe/templates/pages/404.py | 1 + frappe/templates/pages/update_password.py | 1 + frappe/tests/test_assign.py | 1 + frappe/tests/test_client_login.py | 1 + frappe/tests/test_data_import.py | 1 + frappe/tests/test_db_query.py | 1 + frappe/tests/test_defaults.py | 1 + frappe/tests/test_document.py | 1 + frappe/tests/test_filemanager.py | 1 + frappe/tests/test_fmt_money.py | 1 + frappe/tests/test_form_load.py | 1 + frappe/tests/test_geo_ip.py | 1 + frappe/tests/test_translation.py | 1 + frappe/utils/bench_helper.py | 1 + frappe/utils/doctor.py | 1 + frappe/utils/email_lib/html2text.py | 1 + frappe/utils/minify.py | 1 + frappe/utils/momentjs.py | 1 + frappe/utils/pdf.py | 1 + frappe/website/doctype/blog_category/test_blog_category.py | 1 + frappe/website/doctype/blog_post/test_blog_post.py | 1 + frappe/website/doctype/blogger/test_blogger.py | 1 + frappe/website/doctype/web_form/test_web_form.py | 1 + frappe/website/doctype/website_group/test_website_group.py | 1 + 55 files changed, 55 insertions(+) diff --git a/frappe/__version__.py b/frappe/__version__.py index 33111828cc..f14de00a27 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1 +1,2 @@ +from __future__ import unicode_literals __version__ = "4.12.1" diff --git a/frappe/api.py b/frappe/api.py index f16c73b172..6c7d7bb092 100644 --- a/frappe/api.py +++ b/frappe/api.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import json import frappe diff --git a/frappe/app.py b/frappe/app.py index 8d97dae8e7..822c061b67 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import sys, os import json diff --git a/frappe/config/desktop.py b/frappe/config/desktop.py index cf12e060ae..8be70bef51 100644 --- a/frappe/config/desktop.py +++ b/frappe/config/desktop.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/frappe/config/setup.py b/frappe/config/setup.py index 389757e632..c5de393d02 100644 --- a/frappe/config/setup.py +++ b/frappe/config/setup.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ from frappe.widgets.moduleview import add_setup_section diff --git a/frappe/config/website.py b/frappe/config/website.py index ad2fba13b1..369474ad40 100644 --- a/frappe/config/website.py +++ b/frappe/config/website.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/frappe/core/doctype/communication/test_communication.py b/frappe/core/doctype/communication/test_communication.py index e3c73f7eb8..454b3aecca 100644 --- a/frappe/core/doctype/communication/test_communication.py +++ b/frappe/core/doctype/communication/test_communication.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/doctype/boilerplate/test_controller.py b/frappe/core/doctype/doctype/boilerplate/test_controller.py index cc12c9b9c8..d9883d63fb 100644 --- a/frappe/core/doctype/doctype/boilerplate/test_controller.py +++ b/frappe/core/doctype/doctype/boilerplate/test_controller.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, {app_publisher} and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/email_alert/test_email_alert.py b/frappe/core/doctype/email_alert/test_email_alert.py index c53bfcae71..fb49983981 100644 --- a/frappe/core/doctype/email_alert/test_email_alert.py +++ b/frappe/core/doctype/email_alert/test_email_alert.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest diff --git a/frappe/core/doctype/event/test_event.py b/frappe/core/doctype/event/test_event.py index ba2ee14ecf..7f966590b0 100644 --- a/frappe/core/doctype/event/test_event.py +++ b/frappe/core/doctype/event/test_event.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals """Use blog post test to test user permissions logic""" diff --git a/frappe/core/doctype/letter_head/test_letter_head.py b/frappe/core/doctype/letter_head/test_letter_head.py index 15899e2b27..6136a7f8a4 100644 --- a/frappe/core/doctype/letter_head/test_letter_head.py +++ b/frappe/core/doctype/letter_head/test_letter_head.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/doctype/page/test_page.py b/frappe/core/doctype/page/test_page.py index 6ee0e25c32..9ad215c1df 100644 --- a/frappe/core/doctype/page/test_page.py +++ b/frappe/core/doctype/page/test_page.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/print_format/test_print_format.py b/frappe/core/doctype/print_format/test_print_format.py index a6b9981b0f..02761aad17 100644 --- a/frappe/core/doctype/print_format/test_print_format.py +++ b/frappe/core/doctype/print_format/test_print_format.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/role/test_role.py b/frappe/core/doctype/role/test_role.py index cda62d7a2a..961f155e74 100644 --- a/frappe/core/doctype/role/test_role.py +++ b/frappe/core/doctype/role/test_role.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/doctype/user/test_user.py b/frappe/core/doctype/user/test_user.py index 0be0a07d1c..5d4fdb729b 100644 --- a/frappe/core/doctype/user/test_user.py +++ b/frappe/core/doctype/user/test_user.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest diff --git a/frappe/core/doctype/version/test_version.py b/frappe/core/doctype/version/test_version.py index 5bc8781581..544dc0e559 100644 --- a/frappe/core/doctype/version/test_version.py +++ b/frappe/core/doctype/version/test_version.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/core/doctype/workflow_state/test_workflow_state.py b/frappe/core/doctype/workflow_state/test_workflow_state.py index 2bbe87dfed..d31211fc82 100644 --- a/frappe/core/doctype/workflow_state/test_workflow_state.py +++ b/frappe/core/doctype/workflow_state/test_workflow_state.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/core/page/data_import_tool/test_exporter_fixtures.py b/frappe/core/page/data_import_tool/test_exporter_fixtures.py index 862268b00f..c1141de575 100644 --- a/frappe/core/page/data_import_tool/test_exporter_fixtures.py +++ b/frappe/core/page/data_import_tool/test_exporter_fixtures.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe import frappe.defaults diff --git a/frappe/hooks.py b/frappe/hooks.py index 60d1da83e4..7963e491c6 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals app_name = "frappe" app_title = "Frappe Framework" app_publisher = "Web Notes Technologies Pvt. Ltd." diff --git a/frappe/patches/v4_0/add_delete_permission.py b/frappe/patches/v4_0/add_delete_permission.py index 7811217d97..091bdab3ff 100644 --- a/frappe/patches/v4_0/add_delete_permission.py +++ b/frappe/patches/v4_0/add_delete_permission.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/remove_index_sitemap.py b/frappe/patches/v4_0/remove_index_sitemap.py index 00d37eaf2e..5dcd0d79c7 100644 --- a/frappe/patches/v4_0/remove_index_sitemap.py +++ b/frappe/patches/v4_0/remove_index_sitemap.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/rename_profile_to_user.py b/frappe/patches/v4_0/rename_profile_to_user.py index bcb910b80a..8ad86cf531 100644 --- a/frappe/patches/v4_0/rename_profile_to_user.py +++ b/frappe/patches/v4_0/rename_profile_to_user.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model import rename_field diff --git a/frappe/patches/v4_0/rename_sitemap_to_route.py b/frappe/patches/v4_0/rename_sitemap_to_route.py index 991edf1f7c..6cfac7d354 100644 --- a/frappe/patches/v4_0/rename_sitemap_to_route.py +++ b/frappe/patches/v4_0/rename_sitemap_to_route.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model import rename_field diff --git a/frappe/patches/v4_0/set_todo_checked_as_closed.py b/frappe/patches/v4_0/set_todo_checked_as_closed.py index cc4b87a0bc..59e8df3793 100644 --- a/frappe/patches/v4_0/set_todo_checked_as_closed.py +++ b/frappe/patches/v4_0/set_todo_checked_as_closed.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/set_website_route_idx.py b/frappe/patches/v4_0/set_website_route_idx.py index 82f64756a4..663a324008 100644 --- a/frappe/patches/v4_0/set_website_route_idx.py +++ b/frappe/patches/v4_0/set_website_route_idx.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/update_datetime.py b/frappe/patches/v4_0/update_datetime.py index 672dd1940b..0e91174780 100644 --- a/frappe/patches/v4_0/update_datetime.py +++ b/frappe/patches/v4_0/update_datetime.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_0/webnotes_to_frappe.py b/frappe/patches/v4_0/webnotes_to_frappe.py index c70b2fdbde..22b3848d5a 100644 --- a/frappe/patches/v4_0/webnotes_to_frappe.py +++ b/frappe/patches/v4_0/webnotes_to_frappe.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe, json def execute(): diff --git a/frappe/patches/v4_2/refactor_website_routing.py b/frappe/patches/v4_2/refactor_website_routing.py index 9cb39beaf0..a5856db1c9 100644 --- a/frappe/patches/v4_2/refactor_website_routing.py +++ b/frappe/patches/v4_2/refactor_website_routing.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/patches/v4_2/set_assign_in_doc.py b/frappe/patches/v4_2/set_assign_in_doc.py index 664c997eaf..ff20d71432 100644 --- a/frappe/patches/v4_2/set_assign_in_doc.py +++ b/frappe/patches/v4_2/set_assign_in_doc.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/frappe/setup_logging.py b/frappe/setup_logging.py index f7fbc09d21..3de3954195 100644 --- a/frappe/setup_logging.py +++ b/frappe/setup_logging.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import logging import logging.config diff --git a/frappe/templates/includes/comments.py b/frappe/templates/includes/comments.py index 00784e7ea6..0c66f866c3 100644 --- a/frappe/templates/includes/comments.py +++ b/frappe/templates/includes/comments.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe import frappe.utils, markdown2 diff --git a/frappe/templates/pages/404.py b/frappe/templates/pages/404.py index ddd7ca82c8..d2f997080f 100644 --- a/frappe/templates/pages/404.py +++ b/frappe/templates/pages/404.py @@ -1,4 +1,5 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals no_sitemap = 1 diff --git a/frappe/templates/pages/update_password.py b/frappe/templates/pages/update_password.py index cdd40ab260..0864f4fef0 100644 --- a/frappe/templates/pages/update_password.py +++ b/frappe/templates/pages/update_password.py @@ -1,4 +1,5 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals no_sitemap = 1 diff --git a/frappe/tests/test_assign.py b/frappe/tests/test_assign.py index eefdfc2bc9..858487691e 100644 --- a/frappe/tests/test_assign.py +++ b/frappe/tests/test_assign.py @@ -1,5 +1,6 @@ # Copyright (c) 2014, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest import frappe.widgets.form.assign_to diff --git a/frappe/tests/test_client_login.py b/frappe/tests/test_client_login.py index e5a44d5ced..1df60e2819 100644 --- a/frappe/tests/test_client_login.py +++ b/frappe/tests/test_client_login.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import unittest, frappe from frappe.utils import sel diff --git a/frappe/tests/test_data_import.py b/frappe/tests/test_data_import.py index 70ef531e8e..eb1ce8c4b4 100644 --- a/frappe/tests/test_data_import.py +++ b/frappe/tests/test_data_import.py @@ -1,5 +1,6 @@ # Copyright (c) 2014, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest from frappe.core.page.data_import_tool import exporter diff --git a/frappe/tests/test_db_query.py b/frappe/tests/test_db_query.py index abdf219ec8..74f0a3296b 100644 --- a/frappe/tests/test_db_query.py +++ b/frappe/tests/test_db_query.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest diff --git a/frappe/tests/test_defaults.py b/frappe/tests/test_defaults.py index 411e8e6651..aa868ee138 100644 --- a/frappe/tests/test_defaults.py +++ b/frappe/tests/test_defaults.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest diff --git a/frappe/tests/test_document.py b/frappe/tests/test_document.py index 4567473f27..83e98312ff 100644 --- a/frappe/tests/test_document.py +++ b/frappe/tests/test_document.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest diff --git a/frappe/tests/test_filemanager.py b/frappe/tests/test_filemanager.py index 45207d8857..b8f4d66ac8 100644 --- a/frappe/tests/test_filemanager.py +++ b/frappe/tests/test_filemanager.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe import os diff --git a/frappe/tests/test_fmt_money.py b/frappe/tests/test_fmt_money.py index 8080487531..442e74000b 100644 --- a/frappe/tests/test_fmt_money.py +++ b/frappe/tests/test_fmt_money.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe from frappe import _ diff --git a/frappe/tests/test_form_load.py b/frappe/tests/test_form_load.py index 79e7f3ecf4..34ae3e36a5 100644 --- a/frappe/tests/test_form_load.py +++ b/frappe/tests/test_form_load.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest from frappe.widgets.form.meta import get_meta diff --git a/frappe/tests/test_geo_ip.py b/frappe/tests/test_geo_ip.py index a04d1de925..150842bd20 100644 --- a/frappe/tests/test_geo_ip.py +++ b/frappe/tests/test_geo_ip.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/tests/test_translation.py b/frappe/tests/test_translation.py index 6131a10aa0..a640442bee 100644 --- a/frappe/tests/test_translation.py +++ b/frappe/tests/test_translation.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe, unittest, os import frappe.translate diff --git a/frappe/utils/bench_helper.py b/frappe/utils/bench_helper.py index 6c499dcbab..b920347f7a 100644 --- a/frappe/utils/bench_helper.py +++ b/frappe/utils/bench_helper.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import click import frappe import importlib diff --git a/frappe/utils/doctor.py b/frappe/utils/doctor.py index 1f2e00de3c..9ca5af8683 100644 --- a/frappe/utils/doctor.py +++ b/frappe/utils/doctor.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import json, base64, os import frappe.cli from frappe.celery_app import get_celery diff --git a/frappe/utils/email_lib/html2text.py b/frappe/utils/email_lib/html2text.py index d21a0b1a21..9cae1cc76b 100755 --- a/frappe/utils/email_lib/html2text.py +++ b/frappe/utils/email_lib/html2text.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" +from __future__ import unicode_literals __version__ = "3.200.3" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." diff --git a/frappe/utils/minify.py b/frappe/utils/minify.py index 0145f7efb6..ed3bd9787c 100644 --- a/frappe/utils/minify.py +++ b/frappe/utils/minify.py @@ -27,6 +27,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # */ +from __future__ import unicode_literals from StringIO import StringIO diff --git a/frappe/utils/momentjs.py b/frappe/utils/momentjs.py index 67b8452260..b0446ed61d 100644 --- a/frappe/utils/momentjs.py +++ b/frappe/utils/momentjs.py @@ -1,4 +1,5 @@ # get data for moment.js +from __future__ import unicode_literals def update(tz, out): ltz = data["links"].get(tz, tz) zone = data["zones"].get(ltz) diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index 0837e816f5..a5ce980654 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import pdfkit, os, frappe from frappe.utils import scrub_urls diff --git a/frappe/website/doctype/blog_category/test_blog_category.py b/frappe/website/doctype/blog_category/test_blog_category.py index 5a227df02b..fa554f6a15 100644 --- a/frappe/website/doctype/blog_category/test_blog_category.py +++ b/frappe/website/doctype/blog_category/test_blog_category.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/website/doctype/blog_post/test_blog_post.py b/frappe/website/doctype/blog_post/test_blog_post.py index 187daeeba2..b2666305f5 100644 --- a/frappe/website/doctype/blog_post/test_blog_post.py +++ b/frappe/website/doctype/blog_post/test_blog_post.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals """Use blog post test to test user permissions logic""" diff --git a/frappe/website/doctype/blogger/test_blogger.py b/frappe/website/doctype/blogger/test_blogger.py index db7feb4970..ccb03cf4c0 100644 --- a/frappe/website/doctype/blogger/test_blogger.py +++ b/frappe/website/doctype/blogger/test_blogger.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt +from __future__ import unicode_literals import frappe diff --git a/frappe/website/doctype/web_form/test_web_form.py b/frappe/website/doctype/web_form/test_web_form.py index cc9dc7cf43..27fec758f5 100644 --- a/frappe/website/doctype/web_form/test_web_form.py +++ b/frappe/website/doctype/web_form/test_web_form.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/frappe/website/doctype/website_group/test_website_group.py b/frappe/website/doctype/website_group/test_website_group.py index b06104ee43..b87625402a 100644 --- a/frappe/website/doctype/website_group/test_website_group.py +++ b/frappe/website/doctype/website_group/test_website_group.py @@ -1,5 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest From d234939ceea35f21aa9b64c3a71599c63d79e634 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Feb 2015 12:48:49 +0530 Subject: [PATCH 3/7] [fix] changed Text Editor's mysql type to longtext --- frappe/model/db_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/db_schema.py b/frappe/model/db_schema.py index e4e370f4ab..5c923856db 100644 --- a/frappe/model/db_schema.py +++ b/frappe/model/db_schema.py @@ -24,7 +24,7 @@ type_map = { ,'Small Text': ('text', '') ,'Long Text': ('longtext', '') ,'Code': ('text', '') - ,'Text Editor': ('text', '') + ,'Text Editor': ('longtext', '') ,'Date': ('date', '') ,'Datetime': ('datetime', '6') ,'Time': ('time', '6') From 8aee4ebc80def766be93b20d5159160e5d0fe3db Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Feb 2015 13:03:31 +0530 Subject: [PATCH 4/7] [fix] quote unicode urls --- frappe/core/doctype/communication/communication.py | 6 ++---- frappe/utils/data.py | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index cc9e10ef41..8d6a0c54a8 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -4,13 +4,12 @@ from __future__ import unicode_literals import frappe import json -import urllib from email.utils import formataddr from frappe.website.utils import is_signup_enabled from frappe.utils import get_url, cstr from frappe.utils.email_lib.email_body import get_email from frappe.utils.email_lib.smtp import send -from frappe.utils import scrub_urls, cint +from frappe.utils import scrub_urls, cint, quoted from frappe import _ from frappe.model.document import Document @@ -167,14 +166,13 @@ def attach_print(mail, sent_via, print_html, print_format): def set_portal_link(sent_via, comm): """set portal link in footer""" - footer = "" if is_signup_enabled(): is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or sent_via.get("contact_email")) in comm.recipients if is_valid_recipient: - url = "%s/%s/%s" % (get_url(), urllib.quote(sent_via.doctype), urllib.quote(sent_via.name)) + url = quoted("%s/%s/%s" % (get_url(), sent_via.doctype, sent_via.name)) footer = """

View this on our website

""" % url diff --git a/frappe/utils/data.py b/frappe/utils/data.py index dd98847551..c7c880d57a 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -583,10 +583,13 @@ def expand_relative_urls(html): return re.sub('(href|src){1}([\s]*=[\s]*[\'"]?)((?!http)[^\'" >]+)([\'"]?)', _expand_relative_urls, html) +def quoted(url): + return cstr(urllib.quote(encode(url), safe=b"~@#$&()*!+=:;,.?/'")) + def quote_urls(html): def _quote_url(match): groups = list(match.groups()) - groups[2] = urllib.quote(groups[2].encode("utf-8"), safe=b"~@#$&()*!+=:;,.?/'").decode("utf-8") + groups[2] = quoted(groups[2]) return "".join(groups) return re.sub('(href|src){1}([\s]*=[\s]*[\'"]?)((?:http)[^\'">]+)([\'"]?)', _quote_url, html) From 0072aeb3bb628a98acb1aa1eb68be23742ab233e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Feb 2015 22:30:13 +0530 Subject: [PATCH 5/7] [hotfix] removed unicode literals from minify.py --- frappe/utils/minify.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/utils/minify.py b/frappe/utils/minify.py index ed3bd9787c..667879f056 100644 --- a/frappe/utils/minify.py +++ b/frappe/utils/minify.py @@ -27,7 +27,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # */ -from __future__ import unicode_literals from StringIO import StringIO @@ -209,4 +208,4 @@ class JavascriptMinify(object): self.theLookahead = None self._jsmin() - self.instream.close() \ No newline at end of file + self.instream.close() From 3935479b22ddf2e2e745992b4ad79496a4d8a0b2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 25 Feb 2015 18:33:26 +0530 Subject: [PATCH 6/7] minor fix in permissions --- frappe/public/js/frappe/model/perm.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frappe/public/js/frappe/model/perm.js b/frappe/public/js/frappe/model/perm.js index caa49646ef..e203b39dfa 100644 --- a/frappe/public/js/frappe/model/perm.js +++ b/frappe/public/js/frappe/model/perm.js @@ -105,6 +105,12 @@ $.extend(frappe.perm, { delete perm[0][key]; } }); + + $.each(perm, function(i, v) { + if(v===undefined) { + perm[i] = {}; + } + }); }, get_match_rules: function(doctype, ptype) { From 6c605e97f38885468be400c0d14c4269ae1f9f9b Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Thu, 26 Feb 2015 12:38:43 +0600 Subject: [PATCH 7/7] bumped to version 4.12.2 --- frappe/__version__.py | 2 +- frappe/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/__version__.py b/frappe/__version__.py index f14de00a27..991fca2e00 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = "4.12.1" +__version__ = "4.12.2" diff --git a/frappe/hooks.py b/frappe/hooks.py index 7963e491c6..adfb2b2b97 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -4,7 +4,7 @@ app_title = "Frappe Framework" app_publisher = "Web Notes Technologies Pvt. Ltd." app_description = "Full Stack Web Application Framework in Python" app_icon = "assets/frappe/images/frappe.svg" -app_version = "4.12.1" +app_version = "4.12.2" app_color = "#3498db" app_email = "support@frappe.io" diff --git a/setup.py b/setup.py index 5237a425d4..917f8147b9 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.12.1" +version = "4.12.2" with open("requirements.txt", "r") as f: install_requires = f.readlines()