Reputation: 6744
In trying to upgrade my TastyPie app to Django 1.8 but am getting an error message:
Content type for specified type 'html' not found. Please provide it at either the class level or via the arguments.
This happens when the serializer=...
is executed in the following Python code:
class PeopleResource(ModelResource):
movie = fields.ToManyField('movies.api.MovieResource', 'movie', related_name="casts", null=True)
class Meta:
queryset = People.objects.all()
resource_name = 'people'
include_resource_uri = False
always_return_data = True
authorization= Authorization()
serializer = Serializer(formats=['json', 'jsonp', 'xml', 'yaml', 'html', 'plist'])
filtering = {
'name': ALL,
'id': ALL,
}
I don't understand the instruction to provide at class level or by parameter).
Upvotes: 1
Views: 155
Reputation: 14190
From the docs:
The default Serializer supports the following formats:
Upvotes: 1