We have to decide on some rules to make the code coherent. In particular, naming conventions, code organization and (the heart of it) some implementation details.
Example: we have a class named Shelf. In english, its plurial is shelves. But it makes it a bit more difficult to search-and-replace and to be coherent in the API. Let’s see how chocking it is to pluralize it wrongly, with an s in the end: shelfs.
Prefer qty.
When the paramater is an id, say it:
def foo(card_id=None):
Otherwise, it should accept both an object and an id (as a string or an int), so you should check the type.
Don’t use Django’s serializer.