Skip to content

Instantly share code, notes, and snippets.

@collinanderson
Created August 22, 2014 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collinanderson/102c2eccbfabe42c5e42 to your computer and use it in GitHub Desktop.
Save collinanderson/102c2eccbfabe42c5e42 to your computer and use it in GitHub Desktop.
1:20 PM <collinanderson> i had one really, really crazy idea that i almost posted on the thread back in the day. why no just have a _meta.fields that _is_ an OrderedDict of _all_ (non related object?) fields. it would be name -> field_instance
1:21 PM <collinanderson> that way you don't even need .get_field() (singular). you just say _meta.fields['field_name']
1:21 PM <collinanderson> though you would likely do a lot of iterating over _meta.fields.values()
1:22 PM <collinanderson> that way it would preserve the order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment