Sidebar blocks

2010-11-13 Thread dgmyrs
Hi, I am just getting started in Django, and am running into a question about the best Django way to go about setting up sidebar type blocks. For my site I would like to have a few sidebar items that are dynamically driven from the database. I am confused as to how this fits into the views and te

Re: Sidebar blocks

2010-11-13 Thread dgmyrs
Perfect, that's exactly what I was looking for. Thanks. On Nov 13, 8:49 am, Jason Mayfield wrote: > On Nov 12, 2010, at 11:41 PM, dgmyrs wrote: > > > So in summary, I am looking for advice on how this sort of issue > > should be approached in Django. > > I don'

IN clause in raw sql

2010-12-08 Thread dgmyrs
Hi, I am trying to work with an in clause in my sql in a raw sql statement. A simplified example: >>>Category.objects.raw('select * from app_category where name >>>in(\'Restaurants\',\'Fast Food\')')[0] So that works fine with the in clause hard coded in there, and I could simply build that

Re: IN clause in raw sql

2010-12-08 Thread dgmyrs
That's a simplified sql just as an example. The actual one I need the in clause is a lot more complex and can't be handled in the ORM. On Dec 8, 11:40 am, Tom Evans wrote: > On Wed, Dec 8, 2010 at 5:21 PM, dgmyrs wrote: > > Hi, I am trying to work with an in clause in