Re: ManyToManyField and order_by

2007-08-31 Thread Viraj Alankar
Anyone have ideas on this? I can do it with extra(): http://www.djangoproject.com/documentation/db-api/#extra-select-none-where-none-params-none-tables-none But this is seems bad to resort to sql. This seems like such a common operation to do. Thanks, Viraj. On Aug 24, 2:13 pm, Viraj Alankar

ManyToManyField and order_by

2007-08-24 Thread Viraj Alankar
Hi, I'm trying to do some simple ordering without having to resort to raw sql. Let's say I have models similar to the pizza example in the documentation: class Topping(models.Model): # ... class Pizza(models.Model): # ... toppings = models.ManyToManyField(Topping) I want to get a l

application and project coupling in unittests

2007-08-19 Thread Viraj Alankar
Hi, I've just started playing around with Django and have a question on unittesting. The docs mention that tests are looked for in the models.py files of applications and a tests.py file in the application directory. This seems to let me write tests specific to the application. However, when usin