work = Work.objects.order_by('-id').first()
work = serializers.serialize('json', dict(
work=work,
work_images=work.workimage_set.all
))
return JsonResponse(work)
Ошибка:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/path_project/views.py", line 37, in get_yet_work
work_images=work.workimage_set.all
File "/path_project/env/lib/python3.6/site-packages/django/core/serializers/__init__.py", line 129, in serialize
s.serialize(queryset, **options)
File "/path_project/env/lib/python3.6/site-packages/django/core/serializers/base.py", line 83, in serialize
concrete_model = obj._meta.concrete_model
AttributeError: 'str' object has no attribute '_meta'
[03/Jul/2017 07:13:15] "POST /services/mobile/get_yet_work/ HTTP/1.1" 500 13972