[open-ils-commits] r136 - servres/trunk/conifer/syrup (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 3 21:08:44 EST 2009
Author: gfawcett
Date: 2009-03-03 21:08:42 -0500 (Tue, 03 Mar 2009)
New Revision: 136
Modified:
servres/trunk/conifer/syrup/generics.py
servres/trunk/conifer/syrup/models.py
Log:
fixed over-specialization bug in generics.py.
Modified: servres/trunk/conifer/syrup/generics.py
===================================================================
--- servres/trunk/conifer/syrup/generics.py 2009-03-04 01:33:53 UTC (rev 135)
+++ servres/trunk/conifer/syrup/generics.py 2009-03-04 02:08:42 UTC (rev 136)
@@ -25,7 +25,7 @@
return HttpResponseRedirect('../')
def generic_delete(form, request, obj_id):
- instance = get_object_or_404(models.Term, pk=obj_id)
+ instance = get_object_or_404(form.Meta.model, pk=obj_id)
if request.method != 'POST':
form = form(instance=instance)
return g.render('generic/delete.xhtml', **locals())
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2009-03-04 01:33:53 UTC (rev 135)
+++ servres/trunk/conifer/syrup/models.py 2009-03-04 02:08:42 UTC (rev 136)
@@ -405,6 +405,9 @@
('markdown', _('Markdown'))),
default = 'html')
+ def __unicode__(self):
+ return u'%s (%s)' % (self.subject, self.published)
+
def generated_body(self):
if self.encoding == 'plain':
return self.body
More information about the open-ils-commits
mailing list