|
Re: "join" query in Django?: msg#02255DjangoUsers
Thanks Malcom for replay, but, is not working for me, i think that is simple just .filter("field1__field2"), but i cant make the join i try with .filter("field1__field2") where the field1 is the PK and the field2 is the FK. here is my query: p = Diligencia.objects.filter(Q(socio=request.user.id),Q(status=0) | Q (status=1)| Q(status=3)).filter("id__diligencia") and the error is: too many values to unpack im new with Django i cant understand this error, i searched and i cant find answer about it. The another try was: p = Diligencia.objects.filter(Q(socio=request.user.id),Q(status=0) | Q (status=1)| Q(status=3)).select_related() in this case i dont have errors but the data that i want to show from the second table is not showing... and Django dont have any setting function that will show the "SQL" that is happening in any query, like CodeIgniter "Profiler APP", that show you the SQL and you will see if the query is selecting the data that you want... im lost with Django...i missing PHP and Codeigniter :(, but i want to learn Django Im sorry with my english and my errors with djando :( --~--~---------~--~----~------------~-------~--~----~ 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@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to django-users+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |