diff --git a/shelfzilla/apps/users/views.py b/shelfzilla/apps/users/views.py index d5ec01d..99298e8 100644 --- a/shelfzilla/apps/users/views.py +++ b/shelfzilla/apps/users/views.py @@ -63,15 +63,18 @@ class LogoutView(View): class ProfileView(View): - template = 'users/profile/{}.html' + tempalte = 'users/profile.html' + template_section = 'users/profile/{}.html' def get(self, request, section='summary'): if request.user.is_authenticated(): data = { 'item': User.objects.get(pk=request.user.pk) } - - template = self.template.format(section) + if section != 'summary': + template = self.template_section.format(section) + else: + template = self.tempalte data = self.get_context_from_section(request, section, data) ctx = RequestContext(request, data) diff --git a/shelfzilla/themes/bootflat/templates/users/profile.html b/shelfzilla/themes/bootflat/templates/users/profile.html index 98fd7e3..702f343 100644 --- a/shelfzilla/themes/bootflat/templates/users/profile.html +++ b/shelfzilla/themes/bootflat/templates/users/profile.html @@ -23,7 +23,7 @@
- + {% trans "Summary" %} {% trans "Collection" %} @@ -35,7 +35,9 @@
- {% block profile_content %}{% endblock %} + {% block profile_content %} + {% include "users/profile/summary.html" %} + {% endblock %}
diff --git a/shelfzilla/themes/bootflat/templates/users/profile/summary.html b/shelfzilla/themes/bootflat/templates/users/profile/summary.html index f7bcbf9..4fc316b 100644 --- a/shelfzilla/themes/bootflat/templates/users/profile/summary.html +++ b/shelfzilla/themes/bootflat/templates/users/profile/summary.html @@ -1,7 +1,9 @@ +{% comment %} {% extends 'users/profile.html'|pjax:request %} {% load i18n %} {% block page_title %}{{ block.super }}{% endblock %} +{% endcomment %} {% block profile_content %}