I have the following model class sdetails(models.Model): color = models.ForeignKey(color) size = models.ForeignKey(size) price = models.ForeignKey(price) theslug = models.SlugField(prepopulate_from=("color", "size", "price"))
class Admin: pass def __str__(self,): return str(self.size) However, when I add a new entry and I select a value for each ForeignKeys the SlugField doesn't get populated. The reason why I want this is because I don't know how to return multiple fields. Right now I have 'return str(self.size)'. Is there a way that I can return color, size, and and price. For example I would like to have something like 'return str(self.color, self.size, self.price)'. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---