From c9574ebe99199d05c840839e798727e46761caa1 Mon Sep 17 00:00:00 2001 From: Dmitriy Shesterkin Date: Wed, 6 Sep 2017 22:03:04 +0300 Subject: [PATCH] some fixes --- src/customer/models.py | 2 +- src/customer/views/profile.py | 3 ++- src/dokumentor/settings/testing.py | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/customer/models.py b/src/customer/models.py index 074b923..3df4c3c 100644 --- a/src/customer/models.py +++ b/src/customer/models.py @@ -847,7 +847,7 @@ def check_license_dependence(sender, **kwargs): payment.user.profile.active = True payment.user.profile.save() - + bonus_license = create_bonus_license(lic) if bonus_license: emails.send_bonus_license_issued.delay( diff --git a/src/customer/views/profile.py b/src/customer/views/profile.py index c2476a8..700f78c 100644 --- a/src/customer/views/profile.py +++ b/src/customer/views/profile.py @@ -177,7 +177,8 @@ def upload_image(request): if not os.path.exists(settings.MEDIA_ROOT + '/cache/images/'): os.makedirs(settings.MEDIA_ROOT + '/cache/images/') tmp_dir = tempfile.mkdtemp('img_tmp', settings.MEDIA_ROOT + '/cache/images/') - os.chmod(tmp_dir, 755) + if not settings.DEBUG: + os.chmod(tmp_dir, 755) b64_text = request.POST.get('image') format_file, img_str = b64_text.split(';base64,') ext = format_file.split('/')[-1] diff --git a/src/dokumentor/settings/testing.py b/src/dokumentor/settings/testing.py index f791e05..bbba27d 100644 --- a/src/dokumentor/settings/testing.py +++ b/src/dokumentor/settings/testing.py @@ -28,3 +28,13 @@ LOGGING = {} LOCAL_APPS_LOGGERS = {} # Disable all logging calls with levels less severe than or equal to CRITICAL logging.disable(logging.CRITICAL) + +# Robokassa +ROBOKASSA_LOGIN = 'Dokumentor' +# Test +ROBOKASSA_PASSWORD1 = 'ZtcV4jzgJ5qI2Cx7Rc4a' +ROBOKASSA_PASSWORD2 = 'iuJI7adaUGGE96QKz17a' + +ROBOKASSA_USE_POST = True +ROBOKASSA_STRICT_CHECK = False +ROBOKASSA_TEST_MODE = True