Skip to content Skip to sidebar Skip to footer

How To Change The Value Of Model Field When Button Is Clicked In Django?

I'm making a django app in which the homepage shows list of internships available of different companies.A user of usertype=Student can view those internships. Each internship list

Solution 1:

Checking this a little more, the problem looks like that you try to submit an empty form. So you should try to do the following:

in the view:

if “applybtn” in request.POST:
    # dothis and that

The name of the button will be in the request thus it should work.

Post a Comment for "How To Change The Value Of Model Field When Button Is Clicked In Django?"