Add view to show list of events performed by an user.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-10-21 17:58:05 -04:00
parent 677f49aed5
commit b660c8055f
6 changed files with 46 additions and 4 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
from __future__ import unicode_literals
from django.apps import apps
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_lazy as _
from common import (
@@ -14,7 +15,7 @@ from rest_api.classes import APIEndPoint
from .links import (
link_events_list, link_event_types_subscriptions_list,
link_notification_mark_read, link_notification_mark_read_all,
link_user_notifications_list,
link_user_events, link_user_notifications_list,
)
from .licenses import * # NOQA
from .widgets import event_object_link, event_type_link
@@ -38,6 +39,7 @@ class EventsApp(MayanAppConfig):
Action = apps.get_model(app_label='actstream', model_name='Action')
Notification = self.get_model(model_name='Notification')
StoredEventType = self.get_model(model_name='StoredEventType')
User = get_user_model()
APIEndPoint(app=self, version_string='1')
@@ -94,6 +96,9 @@ class EventsApp(MayanAppConfig):
menu_object.bind_links(
links=(link_notification_mark_read,), sources=(Notification,)
)
menu_object.bind_links(
links=(link_user_events,), sources=(User,)
)
menu_secondary.bind_links(
links=(link_notification_mark_read_all,),
sources=('events:user_notifications_list',)