Commit 976d464e26fee685c5a3318d5f2b033158a022ea

Authored by fbormann
1 parent 753af621

uploaded file notification working

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
files/views.py
... ... @@ -12,6 +12,7 @@ from .utils import mime_type_to_material_icons
12 12 from courses.models import Topic
13 13 from core.models import MimeType
14 14 from core.mixins import NotificationMixin
  15 +from django.urls import reverse
15 16  
16 17 # Create your views here.
17 18 class CreateFile(LoginRequiredMixin, HasRoleMixin, NotificationMixin, generic.edit.CreateView):
... ... @@ -61,7 +62,7 @@ class CreateFile(LoginRequiredMixin, HasRoleMixin, NotificationMixin, generic.ed
61 62 self.object.save()
62 63 #CREATE NOTIFICATION
63 64 super(CreateFile, self).createNotification(message="uploaded a File "+ self.object.name, actor=self.request.user,
64   - resource_name=self.object.name, resource_link= reverse('course:file:create_file', args=[self.object.slug]),
  65 + resource_name=self.object.name, resource_link= reverse('course:view_topic', args=[self.object.topic.slug]),
65 66 users=self.object.topic.subject.students.all())
66 67  
67 68 return self.get_success_url()
... ...