title: how to update and delete data in django rest framework
body: <p>I'm doing CRUD in DRF and 2 operations(Get, Post) are working fine but got an error in PUT and DELETE operation. Put() missing 1 required positional argument: 'id' and same error for delete. delete() missing 1 required positional argument: 'id', and when i try to get data by passing id in url i got this error "get() got an unexpected keyword argument 'id'"</p>
  
  <p>i changed url pattern but getting the same error</p>
  
  <blockquote>
    <p>views.py  </p>
  </blockquote>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse
  from django.shortcuts import get_object_or_404
  from rest_framework.views import APIView
  from rest_framework.response import Response
  from rest_framework import status
  from .models import Employee
  from .serializer import EmployeeSerializer
  
  class employeeList(APIView):
  
      def get(self, request):
          employee1 = Employee.objects.all()
          serializer1 = EmployeeSerializer(employee1 , many = True)
          return Response(serializer1.data)
  
      def post(self, request):
          employee1 = request.data.get("")
          serializer1 = EmployeeSerializer(data=request.data, 
  partial=True)
          if serializer1.is_valid(raise_exception=True):
              employee_saved = serializer1.save()
          return Response({"success": "Employee '{}' created 
  successfully".format(employee_saved.first_name)})
      def put(self , request, id):
          employee = get_object_or_404(Employee, id=id)
          data = request.data.get("")
          serializer1 = EmployeeSerializer(instance = employee , 
  data=data, partial=True)
          if serializer1.is_valid(raise_exception=True):
              saved_employee = serializer1.save()
          return Response({"success":"Employee '{}' updated 
  successfully".format(saved_employee.first_name)})
      def delete(self, request, id):
          employee = get_object_or_404(Employee, id=id)
          employee.delete()
          return Response({"message":"Employee '{}' deleted 
  successfully".format(employee.first_name)}, status=204)
  </code></pre>
  
  <blockquote>
    <p>serializer.py</p>
  </blockquote>
  
  <pre><code>from rest_framework import serializers
  from .models import Employee
  
  class EmployeeSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Employee
          fields = '__all__'
      def create(self, validated_data):
          return Employee.objects.create(**validated_data)
      def update(self, instance, validated_data):
  
  instance.first_name=validated_data.get('first_name',instance.first_name)
          instance.last_name = 
  validated_data.get('last_name',instance.last_name)
          instance.employee_id = 
  validated_data.get('employee_id',instance.employee_id)
          instance.save()
          return instance
  </code></pre>
  
  <blockquote>
    <p>urls.py</p>
  </blockquote>
  
  <pre><code>from django.conf.urls import url
  from django.contrib import admin
  from webapp import views
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^employee/', views.employeeList.as_view()),
      url(r'^employees/(?P&lt;id&gt;[0-9]+)$', views.employeeList.as_view())
  ]
  </code></pre>
  
  <p>i expect to see the success message but i get error message</p>