From cb9c74eff8f7c3469cc5e84477074c138ed555df Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 5 Jul 2010 22:20:28 -0500 Subject: Add absolute URL method for todo lists Signed-off-by: Dan McGee --- main/models.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main') diff --git a/main/models.py b/main/models.py index 208ea1a7..b6922680 100644 --- a/main/models.py +++ b/main/models.py @@ -367,6 +367,9 @@ def package_names(self): class Meta: db_table = 'todolists' + def get_absolute_url(self): + return '/todo/%i/' % self.id + class TodolistPkg(models.Model): id = models.AutoField(primary_key=True) list = models.ForeignKey('Todolist') -- cgit v1.2.3-54-g00ecf