I am fairly new to Python/Django. What I would like to do is to store descriptions of cars separately, but simultaneously I would like to label (in django admin) car description like this:
class CarDescription(models.Model):
length = models.IntegerField(max_length=10)
def __unicode__(self):
return "description of the car no %d" % (Car.id)
class Car(models.Model):
description = models.OneToOneField(CarDescription)
I know that Car.id is wrong there (circular reference). Is there any way to solve it?