model unicode methods should generally include their id.

This commit is contained in:
Sanj 2011-05-11 01:59:02 +05:30
parent cfbe017711
commit ca6e910c8a

View File

@ -82,7 +82,7 @@ class Product(models.Model):
audios = models.ManyToManyField("Audio", blank=True)
def __unicode__(self):
return "%s" % (self.title)
return "%d: %s" % (self.id, self.title,)
def get_print_multiplier(self, dpi):
# product = Product.objects.get(pk=self.product.id)
@ -269,7 +269,7 @@ class Article(models.Model):
return m
def __unicode__(self):
return self.name
return "%d: %s" % (self.id, self.name,)
def get_dict(self, *args):
if len(args) > 0: