summaryrefslogtreecommitdiff
path: root/todolists
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2007-12-29 16:42:55 -0800
committereliott <eliott@cactuswax.net>2007-12-29 16:42:55 -0800
commit3e297efad8e6dbb7622cedd68a2457f00dd09080 (patch)
tree1d66d932fa8e90bfa2c71f92d77a24b823831540 /todolists
parentff6d99b054efddb0725b0ddcbc81c58f7c8ce375 (diff)
Massive retab fest.
Also added vim command comment to the end of files.
Diffstat (limited to 'todolists')
-rw-r--r--todolists/models.py44
-rw-r--r--todolists/views.py3
2 files changed, 26 insertions, 21 deletions
diff --git a/todolists/models.py b/todolists/models.py
index c5893f03..ec24d5ed 100644
--- a/todolists/models.py
+++ b/todolists/models.py
@@ -3,29 +3,31 @@ from django.contrib.auth.models import User
from archweb_dev.packages.models import Package
class TodolistManager(models.Manager):
- def get_incomplete(self):
- results = []
- for l in self.all().order_by('-date_added'):
- if TodolistPkg.objects.filter(list=l.id).filter(complete=False).count() > 0:
- results.append(l)
- return results
+ def get_incomplete(self):
+ results = []
+ for l in self.all().order_by('-date_added'):
+ if TodolistPkg.objects.filter(list=l.id).filter(complete=False).count() > 0:
+ results.append(l)
+ return results
class Todolist(models.Model):
- id = models.AutoField(primary_key=True)
- creator = models.ForeignKey(User)
- name = models.CharField(maxlength=255)
- description = models.TextField()
- date_added = models.DateField(auto_now_add=True)
- objects = TodolistManager()
- class Meta:
- db_table = 'todolists'
+ id = models.AutoField(primary_key=True)
+ creator = models.ForeignKey(User)
+ name = models.CharField(maxlength=255)
+ description = models.TextField()
+ date_added = models.DateField(auto_now_add=True)
+ objects = TodolistManager()
+ class Meta:
+ db_table = 'todolists'
class TodolistPkg(models.Model):
- id = models.AutoField(primary_key=True)
- list = models.ForeignKey(Todolist)
- pkg = models.ForeignKey(Package)
- complete = models.BooleanField(default=False)
- class Meta:
- db_table = 'todolists_pkgs'
- unique_together = (('list','pkg'),)
+ id = models.AutoField(primary_key=True)
+ list = models.ForeignKey(Todolist)
+ pkg = models.ForeignKey(Package)
+ complete = models.BooleanField(default=False)
+ class Meta:
+ db_table = 'todolists_pkgs'
+ unique_together = (('list','pkg'),)
+
+# vim: set ts=4 sw=4 et:
diff --git a/todolists/views.py b/todolists/views.py
index 225da15b..cce92a6c 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -61,3 +61,6 @@ def add(request):
pass
return HttpResponseRedirect('/todo/')
return render_response(request, 'todolists/add.html')
+
+# vim: set ts=4 sw=4 et:
+