Beispiel #1
0
def hardware_hacker_tabs(user):
    l = [
        ('Available', reverse('hw_list'), False),
    ]
    count = Request.pending_objects(user).count()
    if count:
        l.append(('Requested', reverse('hw_request'), count), )
    active = Request.active_objects(user).count()
    if active:
        l.append(('Active', reverse('hw_active'), active), )
    return l
Beispiel #2
0
 def get_queryset(self):
     return Request.pending_objects(user_id=self.kwargs['id']).all()
Beispiel #3
0
 def get_queryset(self):
     return Request.active_objects(self.request.user.pk).all()
Beispiel #4
0
 def get_queryset(self):
     return Request.pending_objects(self.request.user.pk).all()
Beispiel #5
0
 def get_queryset(self):
     return Request.active_overall().all()
Beispiel #6
0
 def get_queryset(self):
     return Request.historic_objects(self.kwargs['id']).all()