示例#1
0
 def users_circle_by_date(self, bwuser, pagenum=0, pagesize=10, force=False):
     if not force and not AccessModel.can_access_profile(self.context_bwuser, bwuser):
         raise ProfilePermissionsException()
     p = pagenum * pagesize
     q = p + pagesize
     #return Writ.objects.filter(participants__in=bwu.circle.all()).order_by('last_addition_date')[p:q]
     return Writ.objects.filter(participants__circle__id=bwuser.circle.all()).order_by('last_addition_date')[p:q]
示例#2
0
    def users_active_by_date(self, bwuser, pagenum=0, pagesize=10, force=False):
        if not force and not AccessModel.can_access_profile(self.context_bwuser, bwuser):
            raise ProfilePermissionsException()
        p = pagenum * pagesize
        q = p + pagesize
        return bwuser.writ_set.filter(is_active=True).order_by('-last_addition_date')[p:q]

        """def get_recent_writs(self, count=-1, onlyactive=False):
示例#3
0
 def users_completed_by_date(self, bwuser, pagenum=0, pagesize=10, force=False):
     if not force and not AccessModel.can_access_profile(self.context_bwuser, bwuser):
         raise ProfilePermissionsException()
     p = pagenum * pagesize
     q = p + pagesize
     return bwuser.writ_set.filter(is_active=False).order_by('last_addition_date')[p:q]