Displaying model in a template.

2019-08-31 Thread Bhavesh Kumar
Hello, You must be aware of that choice should be a list or tuple in django model. In tuple it could be represented as (table_value, rendered_value) ,like [('c', 'cat'), ('d', 'dog')] And I see you have initiated it with a foreign key. Could you please show the values it is having ? Regar

Re: Displaying model in a template.

2019-08-31 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Displaying model in a template.

2019-08-30 Thread Solomon Mbak
I have a code that looks like this: class Courses(models.Model): CourseName = models.CharField(max_length = 250) CourseDescription = models.CharField(max_length = 250) class Questions(models.Model): CAT_CHOICES = models.ForeignKey("main.course_category", on_delete=models.CASCADE)