1

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.

1 Answer 1

1

Take a look on smart_selects, it allows populating one select with constraint on another's value.

Sign up to request clarification or add additional context in comments.

1 Comment

I found a similar project, it seems promising! dajaxproject.com/forms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.