> Well... I disagree. Django IS tough, especially if you're from a PHP/
> SQL school of thought. Don't get me wrong, I think it's worth toughing
> it out. How many times however have I been stuck on simple things,
> seeing the SQL I want but just not able to Django-ize it.

I've been there too but this issue isn't really specific to Django,  
it's really an ORM issue. You'd have the same learning curve going  
from a "PHP/SQL school of thought" to using a PHP framework like Zend  
Framework for example.

> To answer Russ' question, I for one would like to see documentation
> that gives concrete examples on how to convert from PHP/SQL to Python/
> Django. For example:
>
> In PHP, you'd write:
> $result = mysql_query("
> SELECT Category.id, CategoryName.name, SubCategory.id,
> SubCategoryName.name
> FROM Category
> INNER JOIN CategoryName ON CategoryName.Category_id = Category.id
> INNER JOIN SubCategory ON SubCategory.Category_id = Category.id
> INNER JOIN SubCategoryName ON SubCategoryName.SubCategory_id =
> SubCategory.id
> WHERE Category.active = 1
> AND SubCategory.active = 1
> AND CategoryName.languagecode = 'en'
> AND SubCategoryName.languagecode = 'en'
> ORDER BY CategoryName.name, SubCategoryName.name");
>
> In Django, the same query is performed like this:
> (I wish I knew...)

You can do it pretty well the same way:

http://docs.djangoproject.com/en/dev/topics/db/sql/

You don't have to use the Django ORM for everything and you can always  
fall back on just SQL until you're confident enough.

Cheers,

Nick

--~--~---------~--~----~------------~-------~--~----~
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