>> 1) Does your webhost need to support Django specifically or >> is it sufficient if they support Python? (e.g. with CakePHP >> you just need general PHP support). > > Just Python will be enough. You can have a copy of Django in > any directory, providing the webserver can be configured to > find it, which is normally very easy.
I'd give a caveat here that if they don't have mod_python/mod_wsgi/wsgi access, you have to kludge Django+CGI which has performance issues. Lots of cheapo hosting services provide CGI Python abilities, but not one of the more efficient means. >> 2) I want to use raw sql for all my select queries (to have >> 100% control and because I don't see the point of learning >> another query language - I do like ORM to insert/update >> records from a form). Can I use multiline strings? Not sure >> because of the python empty space thing, and the examples in >> the documentation are all on one line. E.g. in PHP I do >> something like the following, which I can copy/paste >> straight into my db tools. To the OP, while yes, you can use connection.cursor to execute queries, the ORM does a rather good job of creating excellent queries -- big-time kudos to Malcolm and the rest of the crew responsible for the query-set refactor. The ORM also allows for inserting bits of SQL via the extra() call. Additionally, using the ORM abstracts some of the DB differences (particularly the date/time functionality) so changing between DB engines is easier. As yet another plus, the remainder of Django ties in nicely with the ORM, making a number of items cleaner. As for writing multi-line queries, I've not had any problems, though >> $qry = " >> SELECT * >> FROM table1 >> LEFT JOIN table2 ON ... >> WHERE ... >> ORDER BY >> LIMIT >> " you'll need to use proper Python here, using a triple-quoted string: qry = """SELECT field1, field2 FROM table1 ORDER BY field3""" Otherwise, Malcolm's response is spot-on. -tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---