Using the subversion trunk I finally got this working.
>>> categories.get_list(parent__isnull=True)
Magic, I didn't realize there was an 'isnull' comparison mode.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
Malcolm Tredinnick wrote:
> On Sat, 2006-04-01 at 00:11 -0800, shredwheat wrote:
>> Using a hierarchy of models like the example shown on this cookbook
>> page. How do you query for the root level objects? Can it be done with
>> a single query? Or do I loop over and test on the Python side?
>>
>>
On Sat, 2006-04-01 at 00:11 -0800, shredwheat wrote:
> Using a hierarchy of models like the example shown on this cookbook
> page. How do you query for the root level objects? Can it be done with
> a single query? Or do I loop over and test on the Python side?
>
> http://code.djangoproject.com/wi
Using a hierarchy of models like the example shown on this cookbook
page. How do you query for the root level objects? Can it be done with
a single query? Or do I loop over and test on the Python side?
http://code.djangoproject.com/wiki/CookBookCategoryDataModel
--~--~-~--~~
4 matches
Mail list logo