Django Rest Framework - CreateAPIView doesn't let use POST method
<p>I try to create a view, that will accept POST requests and create new instances of my model(see bottom of post). I follow <a href="https://www.youtube.com/watch?v=dfIB-LthIpE&amp;index=9&amp;list=PLEsfXFp6DpzTOcOVdZF-th7BS_GYGguAS" rel="noreferrer">this</a> tutorial. The problem is that when I access URL associated with view, which inherits from CreateAPIView I dont see a form in html representation of API for creation of new instances and I also see that it accepts GET requests, not POST as it mentioned in documentation. </p>

<p>Page looks like this</p>

<p><a href="https://i.stack.imgur.com/7Jlj0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7Jlj0.png" alt="enter image description here"></a></p>

<p>My views.py</p>

<pre><code>from django.shortcuts import render
from rest_framework.generics import ListAPIView, CreateAPIView
from datingapp.models import Profile
from .serializers import ProfileSerializer, ProfileCreateSerializer

class ProfilesAPIView(ListAPIView):
  queryset = Profile.objects.all()
  serializer_class = ProfileSerializer

class ProfileCreateAPIView(CreateAPIView):
  queryset = Profile.objects.all()
  serializer_class = ProfileCreateSerializer
</code></pre>

<p>My urls.py</p>

<pre><code>from django.conf.urls import url
from django.contrib import admin

from datingapp.views import ProfilesAPIView, ProfileCreateAPIView

urlpatterns = [
   url(r'^admin/', admin.site.urls),
   url(r'api/profiles/', ProfilesAPIView.as_view(), name='list'),
   url(r'api/profiles/create/$', ProfileCreateAPIView.as_view(), name='create')
   ]
</code></pre>

<p>My serializers.py</p>

<pre><code>from rest_framework.serializers import ModelSerializer
from datingapp.models import Profile

class ProfileSerializer(ModelSerializer):
  class Meta:
    model = Profile
    fields = [
        'name',
        'age',
        'heigth'
        'location',
    ]

class ProfileCreateSerializer(ModelSerializer):
  class Meta:
    model = Profile
    fields = [
        'name',
        'age',
        'heigth'
        'location',
    ]  
</code></pre>

<p>In my settings.py I have crispy_forms installed.</p>

<p>What am I doing wrong ?</p>

<p>UPD: here is what I want to achieve</p>

<p><a href="https://i.stack.imgur.com/a2p64.png" rel="noreferrer"><img src="https://i.stack.imgur.com/a2p64.png" alt="enter image description here"></a></p>

<p>As you see there is a form and it accepts only POST and also says that GET is not allowed</p>