Dynamically update Django form field options using Ajax to GET new queryset

后端 未结 2 744
感动是毒
感动是毒 2021-01-13 01:04

I\'m new to coding and django and I\'m struggling to find the solution to the following problem having reviewed the answers I\'ve found.

Im creating a search form wi

2条回答
  •  孤街浪徒
    2021-01-13 01:13

    Use ajax to send the category and retrieve subcategory elements.

    For the category, send it via get request, and using the orm return the subcategories in a json format which you can show using jQuery.

提交回复
热议问题