I have a Tastypie ModelResource which gets its fields from a regular Django Model. I would like to make certain fields read-only on the Tastypie resource, even though they are writeable in the underlying model. Is this possible to accomplish in a simple way?
I've tried the following to no avail:
def __init__(self, **kwargs):
super(ModelResource, self).__init__(**kwargs)
for f in getattr(self.Meta, 'read_onlys', []):
self.fields[f].read_only = True