Commit 168527bd authored by Daniel W Bond's avatar Daniel W Bond
Browse files

get absolute url comments

parent a83229e6
......@@ -12,6 +12,8 @@ class Student(TimeStampedModel):
slug = AutoSlugField(populate_from='user', unique=True)
# populate from user.username, no?
# needs a get_absolute_url ?
def __unicode__(self):
return '%s' % self.user.username
......
......@@ -13,6 +13,8 @@ class Lookout(TimeStampedModel):
slug = AutoSlugField(populate_from='isbn', unique=True)
# needs get_absolute_url
# this should change
def __unicode__(self):
return '<Lookout: %s>' % self.owner.user.username
......
......@@ -53,6 +53,11 @@ class Listing(TimeStampedModel):
# this isn't even what I want, but the stripped down simplistic version doesn't even work
slug = AutoSlugField(populate_from='isbn', unique=True)
# retrieve url for object
# def get_absolute_url(self):
# from django.core.urlresolvers import reverse
# return reverse('trades.views.DetailListing', args=[str(self.id)])
# object call
def __unicode__(self):
if not self.active:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment