We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f8e0c3 + 221d697 commit 50749c4Copy full SHA for 50749c4
docs/topics/html-and-forms.md
@@ -66,9 +66,10 @@ The following view demonstrates an example of using a serializer in a template f
66
67
def post(self, request, pk):
68
profile = get_object_or_404(Profile, pk=pk)
69
- serializer = ProfileSerializer(profile)
+ serializer = ProfileSerializer(profile, data=request.data)
70
if not serializer.is_valid():
71
return Response({'serializer': serializer, 'profile': profile})
72
+ serializer.save()
73
return redirect('profile-list')
74
75
**profile_detail.html**:
0 commit comments