In my app I'm trying to implement a feature that helps the user to insert certain "frequent" data.
# models.py
class ExamSet(models.Model):
set = models.CharField(max_length=40)
class Exam(models.Model):
examset = models.ForeignKey(ExamSet)
value = models.CharField(max_length=40)
# forms.py
class ExamForm(ModelForm):
class Meta:
model = Exam
In particular I'd need to:
1) Display a dropdown menu with a queryset of ExamSet (I'm ok with it)
2) Onclick display all the Exam ModelsForms that point at the selected ExamSet
I'm just a beginner of django-javascript templates, help would be very appreciated :)
Thanks in advance.