Commit fac0372e689e9edfd6c88434cc0996d060d4dbc5

Authored by Zambom
1 parent d1a21020

Removing coordinators and admins from subject participants list

Showing 1 changed file with 2 additions and 5 deletions   Show diff stats
subjects/views.py
... ... @@ -549,9 +549,8 @@ class SubjectDetailView(LoginRequiredMixin, LogMixin, DetailView):
549 549 expire_time = settings.SESSION_SECURITY_EXPIRE_AFTER
550 550  
551 551 context['participants'] = User.objects.filter(
552   - Q(is_staff = True) | Q(subject_student__slug = sub) |
553   - Q(professors__slug = sub) |
554   - Q(coordinators__subject_category__slug = sub)
  552 + Q(subject_student__slug = sub) |
  553 + Q(professors__slug = sub)
555 554 ).extra(select = {'status': status_query}, select_params=(expire_time, expire_time,),).distinct().order_by('status', 'social_name','username').exclude(email = self.request.user.email)
556 555  
557 556 resources = self.request.session.get('resources', None)
... ... @@ -599,8 +598,6 @@ class SubjectSubscribeView(LoginRequiredMixin, LogMixin, TemplateView):
599 598 def post(self, request, *args, **kwargs):
600 599 subject = get_object_or_404(Subject, slug= kwargs.get('slug'))
601 600  
602   - print ("Deu Certo ", subject)
603   -
604 601 if subject.subscribe_end <= datetime.datetime.today().date():
605 602 messages.error(self.request, _('Subscription date is due!'))
606 603 else:
... ...