[Fixed]-Form with manytomany object creation

1๐Ÿ‘

  • person__name__first_name will not really work in the forms, that only works for the django admin
  • you have to create a custom field for the first name and then create a logic for saving on either

    def clean(self):
     // logic here
    

    or

    def save(self, commit=True):
     // put clean data here
     announcement_form = super(AnnouncementForm, self).save(commit=False)
     announcement_form.save()
    

Leave a comment