I am sending a POST via django form to the DRF endpoint.

Here is my form:
<form action="{% url 'entry-list' %}" method="POST" class="form" role="form"
>
{% csrf_token %}
{{form.as_p}}
</form>

It is posting correctly and the item is being created in the Database, 
however the
 /api/entry/
url is displayed (I have Markdown so it shows the web browsable). 

I'd like to change where it goes after post to
 /index/

My View:
class entry_ViewSet(viewsets.ModelViewSet):
    queryset = Entry.objects.all()
    serializer_class= EntrySerializer
    permission_classes = (permissions.IsAuthenticatedOrReadOnly,
IsOwnerOrReadOnly,)
    def perform_create(self, serializer):
        serializer.partial = True
        serializer.save(created_by=self.request.user)

 Can anyone help me out?

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to