title: Django rest framework returning 405 for post methods after deploying
body: <p>I'm developing a API using Django rest framework. In my local, everything is fine. I'm also using swagger to document my API and I can see my post and get methods at swagger.</p>
  
  <p>The problem is, when I deploy my code to the server I get 405 code for my post methods and can't see post methods on swagger. They just disappear.</p>
  
  <p>Here is my api:</p>
  
  <p>Views.py:</p>
  
  <pre><code>from django.http import HttpResponse
  from django.views.decorators.csrf import csrf_exempt
  from rest_framework.renderers import JSONRenderer
  from rest_framework.parsers import JSONParser
  from api.models import Clinic
  from api.serializers import ClinicSerializer
  from rest_framework.views import APIView
  from django.http import Http404
  from rest_framework.response import Response
  from rest_framework import status
  from rest_framework.decorators import api_view
  
  
  
  class ClinicList(APIView):
      """
      List all clinics
      """
      def get(self, request, format = None):
          clinics = Clinic.objects.all()
          serializer = ClinicSerializer(clinics, many = True)
          return Response(serializer.data)
      """
      Save new clinic
      """
      def post(self, request, format = None):
          serializer = ClinicSerializer(data=request.data)
          if(serializer.is_valid()):
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>solution urls.py</p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  
  urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^', include('api.urls')),
      url(r'^docs/', include('rest_framework_swagger.urls')),
  ]
  </code></pre>
  
  <p>api.urls:</p>
  
  <pre><code>    urlpatterns = [
      url(r'^Clinic/$', views.ClinicList.as_view()),
  ]
  
  urlpatterns = format_suffix_patterns(urlpatterns)
  </code></pre>
  
  <p>why am I getting 405 for post methods?</p>