Skip to content

Instantly share code, notes, and snippets.

@andymccurdy
Created March 29, 2011 07:43
Show Gist options
  • Save andymccurdy/891956 to your computer and use it in GitHub Desktop.
Save andymccurdy/891956 to your computer and use it in GitHub Desktop.
FU Django ORM
#good
Foo.objects.get(fk=45)
#not good
Foo.objects.get(fk_id=45)
#good
Foo.objects.create(fk_id=45)
#not good
Foo.objects.create(fk=45)
of course this makes get_or_create unusable when using IDs of objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment