Initial import of codebase

This commit is contained in:
2013-05-05 18:24:00 +01:00
commit 51337beeb0
42 changed files with 1121 additions and 0 deletions

14
app/timer/views.py Normal file
View File

@@ -0,0 +1,14 @@
from django.views.generic import ListView
from django.utils.timezone import now
from timer.models import Timer
class TimerListView(ListView):
model = Timer
def get_queryset(self):
qs = super(TimerListView, self).get_queryset()
if 'active' in self.kwargs:
qs = qs.filter(expiry_datetime__gt=now())
return qs