Django ORM get by ID - do I need to convert Id to Int? -
do need convert this_object_id int before can pass id?
obj = class.objects.get(id=this_object_id) why or why not?
accepts both. building sql query statement, passing int gets converted string or string gets inserted both work. see http://django.readthedocs.org/en/latest/ref/models/lookups.html#lookup-reference lhs , rhs sides of clause being constructed.
Comments
Post a Comment