Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest: standardize on field_id #11

Closed
sheppard opened this issue Jan 23, 2014 · 0 comments · Fixed by #34
Closed

rest: standardize on field_id #11

sheppard opened this issue Jan 23, 2014 · 0 comments · Fixed by #34
Milestone

Comments

@sheppard
Copy link
Member

Foreign keys are serialized as (field)_id, but when saving a model, the field name must be sent without the id suffix. Among other things, this makes form rendering a bit awkward (<input name=field value={{field_id}}>). The best approach is probably to standardize on field_id, and figure out how to remove the field_from_native / field_to_native hacks in IDRelatedField.

@sheppard sheppard changed the title standardize on field_id rest: standardize on field_id Mar 17, 2014
@sheppard sheppard added the rest label Mar 17, 2014
@sheppard sheppard modified the milestones: 0.7, 0.8 Oct 31, 2014
sheppard added a commit that referenced this issue Mar 20, 2015
 - clean up ModelSerializer (fixes #22)
 - use field_id when saving foreign keys (fixes #11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant