Hi,
I'm a new to Django. I know mysql queries.
I cant understand django queries, Basically My understanding
complicated to the django queries. please guide me.
Device.objects.filter(device_id = device_id)[0]
Device->table
device-->column
Device.objects.filter(locked = True)
Device.objec
Hi Ganesh,
Here are some examples:
Filter: SELECT * FROM device WHERE locked = true - returns a QuerySet
which can be evaluated as a list of Device objects
Get: SELECT * FROM device WHERE id = (value of id variable) LIMIT 1 -
returns a single Device object
All: SELECT * FROM schedule - returns a
2 matches
Mail list logo