diff --git a/app/views.py b/app/views.py index 2d76967..90ce690 100644 --- a/app/views.py +++ b/app/views.py @@ -18,10 +18,7 @@ class AppIndex(LoginRequiredMixin, LogMixin, ListView, NotificationMixin): context_object_name = 'objects' paginate_by = 10 - action_name = "Acessar" - resource_name = "home" - users = User.objects.all() - message="testing login and notification broadcast" + def get_queryset(self): if self.request.user.is_staff: @@ -45,7 +42,7 @@ class AppIndex(LoginRequiredMixin, LogMixin, ListView, NotificationMixin): else: self.template_name = "home_teacher_student_content.html" - super(AppIndex, self).createNotification("testando notificacao de login", resource_name="home", resource_link="/login") + #super(AppIndex, self).createNotification("testando notificacao de login", resource_name="home", resource_link="/") return self.response_class(request = self.request, template = self.template_name, context = context, using = self.template_engine, **response_kwargs) diff --git a/core/mixins.py b/core/mixins.py index 162da2f..d2bde1b 100644 --- a/core/mixins.py +++ b/core/mixins.py @@ -44,9 +44,9 @@ class NotificationMixin(object): action_name = '' resource_name = '' - def createNotification(self, message='', actor=None, users = User.objects.all(), action_name = '', resource_name='', resource_link=''): #the default will be a broadcast + def createNotification(self, message='', actor=None, users = User.objects.all(), resource_slug='' ,action_name = '', resource_name='', resource_link=''): #the default will be a broadcast action = Action.objects.filter(name = action_name) - resource = Resource.objects.filter(name = resource_name) + resource = Resource.objects.filter(slug = resource_slug) print(message) if action.exists(): action = action[0] diff --git a/core/static/css/base/amadeus.css b/core/static/css/base/amadeus.css index 9a17ec8..ec0a9ca 100644 --- a/core/static/css/base/amadeus.css +++ b/core/static/css/base/amadeus.css @@ -1,3 +1,12 @@ +/* HEADER */ +#notificationscroll{ + max-height: 500%; + overflow: auto; +} + +/* HEADER */ + + .logoLogin{ padding-bottom: 1%; width: 15%; diff --git a/core/templates/base.html b/core/templates/base.html index 25a9dae..1e46c08 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -54,7 +54,7 @@