Commit 899f93571001243524598fab3834913e51437b10
1 parent
4601482f
Exists in
master
and in
5 other branches
fixing some bugs in professor's course
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
courses/templates/course/view.html
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | {% block sidebar %} | 17 | {% block sidebar %} |
18 | <div class="panel panel-primary"> | 18 | <div class="panel panel-primary"> |
19 | <div class="panel-heading"> | 19 | <div class="panel-heading"> |
20 | - <img src="{{ user.image.url }}" id="img" class="img-circle img-responsive"> | 20 | + <img src="{{ user.image_url }}" id="img" class="img-circle img-responsive"> |
21 | </br> | 21 | </br> |
22 | <div class="row"> | 22 | <div class="row"> |
23 | <div class="col-xs-3 col-md-3"> | 23 | <div class="col-xs-3 col-md-3"> |
courses/views.py
@@ -31,7 +31,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): | @@ -31,7 +31,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): | ||
31 | def get_context_data(self, **kwargs): | 31 | def get_context_data(self, **kwargs): |
32 | context = super(IndexView, self).get_context_data(**kwargs) | 32 | context = super(IndexView, self).get_context_data(**kwargs) |
33 | context['categories'] = Category.objects.all() | 33 | context['categories'] = Category.objects.all() |
34 | - super.createNotification(users= User.obejcts.all(), message="testando a notificacao em login") | 34 | + # super.createNotification(users= User.obejcts.all(), message="testando a notificacao em login") |
35 | return context | 35 | return context |
36 | 36 | ||
37 | class CreateCourseView(LoginRequiredMixin, HasRoleMixin, NotificationMixin,generic.edit.CreateView): | 37 | class CreateCourseView(LoginRequiredMixin, HasRoleMixin, NotificationMixin,generic.edit.CreateView): |
@@ -140,6 +140,8 @@ class CourseView(LoginRequiredMixin, NotificationMixin, generic.DetailView): | @@ -140,6 +140,8 @@ class CourseView(LoginRequiredMixin, NotificationMixin, generic.DetailView): | ||
140 | template_name = 'course/view.html' | 140 | template_name = 'course/view.html' |
141 | 141 | ||
142 | def get_context_data(self, **kwargs): | 142 | def get_context_data(self, **kwargs): |
143 | + subjects = None | ||
144 | + courses = None | ||
143 | context = super(CourseView, self).get_context_data(**kwargs) | 145 | context = super(CourseView, self).get_context_data(**kwargs) |
144 | course = get_object_or_404(Course, slug = self.kwargs.get('slug')) | 146 | course = get_object_or_404(Course, slug = self.kwargs.get('slug')) |
145 | if has_role(self.request.user,'system_admin'): | 147 | if has_role(self.request.user,'system_admin'): |