|
|
|
|
@ -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') |
|
|
|
|
|
|
|
|
|
|