From af4558fdf0748c9283548c19d9d70c33692a2e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=9A=D0=BE=D1=82=D1=8E?= =?UTF-8?q?=D0=BA?= Date: Mon, 26 Jan 2015 11:34:47 +0200 Subject: [PATCH] Task 76 --- accounts/views.py | 8 ++++---- company/edit_views.py | 4 ++-- proj/settings.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index eb7fba7c..b11900c9 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -245,7 +245,7 @@ class BaseProfileView(ProfileInvalidView): profile = self.request.user.profile form = self.form_class(self.request.POST, instance=profile) form.save() - response = {'success': True} + response = {'success': True, 'rating': profile.user.rating} return HttpResponse(json.dumps(response), content_type='application/json') class WorkView(ProfileInvalidView): @@ -261,7 +261,7 @@ class WorkView(ProfileInvalidView): #company = user.company #response = {'success': True, 'url':company.get_permanent_url()} - response = {'success': True} + response = {'success': True, 'rating': user.rating} return HttpResponse(json.dumps(response), content_type='application/json') @@ -279,7 +279,7 @@ class AvatarView(BaseProfileView): form.save() if self.request.is_ajax(): im = get_thumbnail(profile.avatar, '100x100', crop='center') - response = {'success': True, 'url': im.url} + response = {'success': True, 'url': im.url, 'rating': profile.user.rating} return HttpResponse(json.dumps(response), content_type='application/json') else: return HttpResponseRedirect('/profile/') @@ -336,7 +336,7 @@ class NameView(ProfileInvalidView): user = self.request.user form = self.form_class(self.request.POST, instance=user) form.save() - response = {'success': True} + response = {'success': True, 'rating': user.rating} return HttpResponse(json.dumps(response), content_type='application/json') diff --git a/company/edit_views.py b/company/edit_views.py index 4d68879d..89f7e77e 100644 --- a/company/edit_views.py +++ b/company/edit_views.py @@ -25,7 +25,7 @@ class BaseView(ProfileInvalidView): form = self.form_class(self.request.POST, instance=company) form.save() - response = {'success': True} + response = {'success': True, 'rating': company.rating} return HttpResponse(json.dumps(response), content_type='application/json') @@ -50,7 +50,7 @@ class LogoView(BaseView): form.save() if self.request.is_ajax(): im = get_thumbnail(company.logo, '100x100', crop='center') - response = {'success': True, 'url': im.url} + response = {'success': True, 'url': im.url, 'rating': company.rating} return HttpResponse(json.dumps(response), content_type='application/json') else: return HttpResponseRedirect(company.get_permanent_url()) diff --git a/proj/settings.py b/proj/settings.py index bf79b1ce..f4090393 100644 --- a/proj/settings.py +++ b/proj/settings.py @@ -234,7 +234,7 @@ EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'kotzilla' EMAIL_HOST_USER = 'kotzillla@gmail.com' -EMAIL_HOST_PASSWORD = 'fitteR2006!' +EMAIL_HOST_PASSWORD = 'fitteR2006!!' EMAIL_PORT = 587 DEFAULT_FROM_EMAIL = 'kotzillla@gmail.com'