diff --git a/company/edit_views.py b/company/edit_views.py index 11e8b775..f2ed62ad 100644 --- a/company/edit_views.py +++ b/company/edit_views.py @@ -25,7 +25,11 @@ class BaseView(ProfileInvalidView): form = self.form_class(self.request.POST, instance=company) company = form.save() - response = {'success': True, 'rating': company.rating} + try: + rating = company.rating + except AttributeError: + rating = company.master.rating + response = {'success': True, 'rating': rating} return HttpResponse(json.dumps(response), content_type='application/json') diff --git a/templates/client/includes/company/company_object.html b/templates/client/includes/company/company_object.html index 32dfab6a..3fb825e8 100644 --- a/templates/client/includes/company/company_object.html +++ b/templates/client/includes/company/company_object.html @@ -23,22 +23,28 @@
{{ company.specialization }}
+ {% with themes=company.theme.all %} +
+ {% for th in themes %} + {{ th.name }}{% ifnotequal forloop.counter themes|length %},{% endifnotequal %} + {% endfor %} +
+ {% endwith %} +
- {% if company.address %} - {% with address=company.address %} - {% include 'includes/address_block.html' %} +
+ {% with tags=company.tag.all %} + {% for tag in tags %} + {{ tag.name }}, + {% endfor %} {% endwith %} -
- {% endif %} - -
- {% with obj=company filter=filter %} - {% include 'includes/show_tags.html' %} - {% endwith %}

+ {{ company.address_inf }} +
+
@@ -168,17 +174,20 @@