Well, you can’t see from what you’ve provided but you LicencedSoftware model 
doesn’t have a foreign key called software to your Software model. 

Sort that out and it will work. (Look at your references and make sure the 
names match.)

Sent from my iPhone

> On 14 Nov 2018, at 18:29, Toni Marie <tonisw...@gmail.com> wrote:
> 
> Yes I'm sure that's part of it.  I tried a totally separate view for create:
> class LicensedSoftwareList(APIView):
>     queryset = LicensedSoftware.objects.all()
>     serializer_class = LicensedSoftwareSerializer
>     renderer_classes = [TemplateHTMLRenderer]
>     template_name = 'licsoftware-detail.html'
> 
>     def get(self, request, format=None):
>         licsoftware = LicensedSoftware.objects.all()
>         serializer = LicensedSoftwareSerializer(licsoftware)
>         return Response(serializer.data)
> 
>     def post(self, request, format=None):
>         serializer = LicensedSoftwareSerializer(data=request.data)
>         serializer.save()
> 
>         return redirect('../../licsoftware/')
> 
> The error returned is : 
> Got AttributeError when attempting to get a value for field `software` on 
> serializer `LicensedSoftwareSerializer`.
> The serializer field might be named incorrectly and not match any attribute 
> or key on the `QuerySet` instance.
> Original exception text was: 'QuerySet' object has no attribute 'software'.
> 
> "software" is the nested model/serializer.
> But I also tried it with a non-nested model and I got the same error for a 
> field.  Thoughts?
> -- 
> 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 django-rest-framework+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to