Thursday, November 3, 2011

Reg. Basic django.db.models

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.objects.get(device_id = id)

Schedule.objects.all()

filter method what type 0f content return.------> equivalent sql quires
get method what exactly doing-------> equivalent quires
all method what exactly doing ---------> equivalent sql quires


please guide me..

-Ganesh
Did I learn something today? If not, I wasted it.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate