[Answer]-Django validating empty ModelChoice form field

1๐Ÿ‘

โœ…

I think the easier way is just to roll your own. Youโ€™ll just need:

  1. A ChoiceField. Using coerce will let you transform IDs into objects transparently
  2. A view that you AJAX component can query to retrieve the list of valid Pieces for a given Module.
  3. A server-side validation method that checks that the Module and the Piece correspond
๐Ÿ‘คThomas Orozco

Leave a comment