def add_access(self, access_list): from apps.walls.utils import filter_objects list_user, list_subdept, list_dept, list_page = filter_objects(access_list) self.access_users.add(*list_user) self.access_subdepts.add(*list_subdept) self.access_depts.add(*list_dept) self.access_pages.add(*list_page)
def add_notifications(self, notif_list): from apps.walls.utils import filter_objects list_user, list_subdept, list_dept, list_page = filter_objects(notif_list) self.notification_users.add(*list_user) self.notification_subdepts.add(*list_subdept) self.notification_depts.add(*list_dept) self.notification_pages.add(*list_page) self.add_access(notif_list) # This is so that they can read and comment also ...
def add_access(self, access_list): from apps.walls.utils import filter_objects list_user, list_subdept, list_dept, list_page = filter_objects( access_list) self.access_users.add(*list_user) self.access_subdepts.add(*list_subdept) self.access_depts.add(*list_dept) self.access_pages.add(*list_page)
def add_notifications(self, notif_list): from apps.walls.utils import filter_objects list_user, list_subdept, list_dept, list_page = filter_objects( notif_list) self.notification_users.add(*list_user) self.notification_subdepts.add(*list_subdept) self.notification_depts.add(*list_dept) self.notification_pages.add(*list_page) self.add_access( notif_list) # This is so that they can read and comment also ...