Add support for showing the current user's events

Add support kwargs to the SourceColumn class. Improve the
event widgets, views and tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-22 01:33:04 -04:00
parent 66e0d9f357
commit ce0a6368f2
14 changed files with 259 additions and 177 deletions
+8 -7
View File
@@ -8,9 +8,10 @@ from .api_views import (
APINotificationListView, APIObjectEventListView
)
from .views import (
EventListView, EventTypeSubscriptionListView, NotificationListView,
NotificationMarkRead, NotificationMarkReadAll, ObjectEventListView,
ObjectEventTypeSubscriptionListView, UserEventListView, VerbEventListView
CurrentUserEventListView, EventListView, EventTypeSubscriptionListView,
NotificationListView, NotificationMarkRead, NotificationMarkReadAll,
ObjectEventListView, ObjectEventTypeSubscriptionListView,
VerbEventListView
)
urlpatterns = [
@@ -31,15 +32,15 @@ urlpatterns = [
regex=r'^notifications/all/mark_read/$',
view=NotificationMarkReadAll.as_view(), name='notification_mark_read_all'
),
url(
regex=r'^user/events/$', name='current_user_events',
view=CurrentUserEventListView.as_view()
),
url(
regex=r'^user/(?P<app_label>[-\w]+)/(?P<model>[-\w]+)/(?P<object_id>\d+)/subscriptions/$',
view=ObjectEventTypeSubscriptionListView.as_view(),
name='object_event_types_user_subcriptions_list'
),
url(
regex=r'^user/(?P<pk>\d+)/events/$', view=UserEventListView.as_view(),
name='user_events'
),
url(
regex=r'^user/event_types/subscriptions/$',
view=EventTypeSubscriptionListView.as_view(),