On Sun, 2009-04-12 at 14:06 -0700, jrs_66 wrote:
[...]
> On a broader level, is Django's ORM intended for people who don't know
> how to write SQL?  It seems that many hoops have to be jumped through
> to get basic SQL results...

I think that impression is probably only because you're still learning
Django. Simple SQL queries are generally very simple querysets and even
complex SQL queries are relatively simple querysets (that's where the
ORM really comes into it's own, because the complexity of SQL increases
rapidly, whilst the corresponding queryset expression remains as a
straightforward series of changed filters and annotations). That being
said, Django isn't intended to be an SQL replacement. There are things
it intentionally doesn't do (although your problem isn't one of those)
and the ORM is designed to make working with the Python models look
"Pythonic", not to provide a Pythonic way to write SQL. If you're ever
in a position to need a particular piece of SQL, the solution is to use
SQL.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to