toastdriven/django-tastypie — Issue #308: Meta class for Api
Author: poswald
Created: 2011-12-01 13:50:58+00:00
State: open

If you want to apply a serializer to your api, you can do it everywhere except the API class itself. I applied the [CamelCase JSON Serializer](http://django-tastypie.readthedocs.org/en/latest/cookbook.html#camelcase-json-serialization) to all of my classes but there's no way to use it on the Api itself. For example, the `Api.top_level` method just grabs and creates a new Serializer() object. (see https://github.com/toastdriven/django-tastypie/blob/master/tastypie/api.py#L103)

I think it makes sense for the API object to get a `Meta` class to hold this kind of data. Alternately, it might make sense to extract the idea of a top_level view into a resource that is included by default that could then be overridden. What do you think?