> This should be writable in a slightly more Djangoic (I suppose if 
> Python code is Pythonic, Django code is Djangoic?  Djanonic? 
> Djangonical?  Djangoish?) fashion:
>   
my vote would be to user "superfly," as in:
This should be writable in a slightly more superfly fashion
>    entries = Journal.objects.filter(note__startswith = q)
>    entries = entries.extra(where='length(note) > 0')
>   
I've spent some time recently rewriting some of my custom managers to 
use the extra method, and I highly recommend it. I know it may not be 
possible in all circumstances, but for things like sorting and using 
generic views it made my life a lot easier. I do suggest spending time 
playing with it in the shell to get the hang of it.

So, nothing of real substance to impart here, just to encourage you to 
check out the extras() method.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to