Closed yakxxx closed 11 years ago
Can you please make a test which fail without this patch and pass with it?
ID's should be changed through REST interface. URIs should be immutable. So this was on purpose made read-only. Do you have an use case where this is not so?
Otherwise it seems Tastypie does not set readonly on primary keys, so we will also not force it here, just map attributes options by default (so ids will get by default unique flag and so on, but not readonly).
I believe that intention of the author was to make some values given in kwarg have their defaults. But what he actually did is he imposed this values and made them impossible to change.
What i wanted to do in my Resource is to map '_id' field to 'id' field. I do this:
But readonly and null args are ignored.