Opened 18 years ago
Last modified 14 years ago
#5535 closed
.get() should allow myforeignkey_id lookups — at Initial Version
Description ¶
To allow easy accessibility as you can with .create on foreignkey_id calls, .get should allow the same.
e.g.
MyModel.objects.create(author_id=1) # Works
MyModel.objects.create(author=Author(id=1)) # Works
MyModel.objects.get(author_id=1) # Doesn't Work
MyModel.objects.get(author=Author(id=1)) # Works
MyModel.objects.get_or_create(author_id=1) # Doesn't Work
Note:
See TracTickets
for help on using tickets.