diff --git a/apps/user/templates/user/profile.html b/apps/user/templates/user/profile.html index 0efe07b9..3b107ff5 100644 --- a/apps/user/templates/user/profile.html +++ b/apps/user/templates/user/profile.html @@ -68,9 +68,11 @@ ПРИОБРЕТЕННЫЕ КУРСЫ + {% if not simple_user %} ОПУБЛИКОВАННЫЕ КУРСЫ + {% endif %} ШКОЛА {% comment %} КУРСЫ @@ -88,6 +90,7 @@ + {% if not simple_user %} @@ -95,6 +98,7 @@ + {% endif %} diff --git a/apps/user/views.py b/apps/user/views.py index d98bcc07..e3c4b22c 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -49,6 +49,7 @@ class UserView(DetailView): def get_context_data(self, object): context = super().get_context_data() + context['simple_user'] = self.request.user.role == User.USER_ROLE context['published'] = Course.objects.filter( author=self.object, )