On Jan 21, 9:27 am, urukay <[email protected]> wrote:
> Hi
>
> i would use raw SQL to retrieve models, that would be the fastest way i
> quess:http://docs.djangoproject.com/en/dev/topics/db/sql/
>
> from django.db import connection
>
> cursor = connection.cursor()
> cursor.execute(...Sqlquery...)
> .......
> .......
>
> Other way could look like this:
>
> result = []
> all_models=MyModel.objects.all()
> for x in all_models:
>    if x.width>x.maxwidth:
>        result.append(x)
> .......
> .......
>
> Hope it helps.

Thank you, but... it won't. Your example works, but it is not what I
need.
I need a queryset method, much like .filter(), to return a queryset,
applying that condition.


--
Costin Stroie

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

Reply via email to