PUT method is not working in django REST?
<p>PUT method is not working in my django rest frame work.</p>

<p>Models.py</p>

<pre><code>class Profile(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30,blank=True)
</code></pre>

<p>Corresponding view</p>

<pre><code>class ProfileDetailsView(APIView):
    """
    Get, udpate,  a user's profile
    """

    template_name = 'users/profile.html'
    form_class = UserProfileForm
    authentication_classes = (SessionAuthentication,)


    def get_object(self, pk):
        try:
            return Profile.objects.get(pk=pk)
        except Profile.DoesNotExist:
            raise Http404

    def get(self, request, pk, format=None):
        print "111111111111111111"
        profile = self.get_object(pk)
        serializer = UserProfileSerializer(profile)
        return render(request, self.template_name, context=serializer.data)


    def put(self, request, pk):
        print "2222222222222222222"
</code></pre>

<p>When I request the page(GET), it displays the corresponding details(profile details). But when I submit the page(PUT) it still goes to <code>get</code> section instead of <code>put</code>.
It works well when I use the REST view. The problem is with the web view(html).What I'm missing?
Any help appreciated</p>

<p>HTML page</p>

<pre><code>&lt;form class="form-profile" &gt;{% csrf_token %}
 &lt;div class="form-horizontal"&gt;
  &lt;div class="form-group"&gt; 
   &lt;label class="col-sm-2 control-label"&gt;First name&lt;/label&gt;
   &lt;div class="col-sm-10"&gt;
    &lt;input value="{{first_name}}" class="form-control" id="first_name" maxlength="255" name="first_name" placeholder="First name" required="required" type="text" /&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;div class="form-group"&gt; 
   &lt;label class="col-sm-2 control-label"&gt;Last name&lt;/label&gt;
    &lt;div class="col-sm-10"&gt;
     &lt;input value="{{last_name}}" class="form-control" id="last_name" maxlength="255" name="last_name" placeholder="First name" type="text" /&gt;
    &lt;/div&gt;
  &lt;/div&gt;
 &lt;/div&gt;
&lt;/form&gt;
</code></pre>