Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella
y "The chapter belongs to a single book" with a foreign key: class Book(models.Model):    title = models.CharField(max_length=250) class Chapters(models.Model):    title = models.CharField(max_length=250)    text = models.TextField()    book = models.ForeignKey(Book) Now a chapt

Re: New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread germano carella
ok" with a foreign key: class Book(models.Model):    title = models.CharField(max_length=250) class Chapters(models.Model):    title = models.CharField(max_length=250)    text = models.TextField()    book = models.ForeignKey(Book) Now a chapter can belong only to a book. On Thu, Aug 9, 2018 at 4

New member: Germano Carella. I need help with django, limit_choices_to and admin interface

2018-08-09 Thread Germano Carella
Hi, I'm Germano from Italy. I'm new of django. Probably this discussion has many many examples, but I can't find my situation. I have two models, Book and Chapters. These are simple models, I need them only for educational purpose. class Book(models.Model): title=models.CharField(max_length=2