Re: Django and a basic SQL join

2009-05-06 Thread Clément Nodet
> > In your case e is a QuerySet, with multiple FlattenedCategory objects. > > So the proper code would be to loop through them: > > {{{ > for fc in e: >     fc.category_set > }}} > Indeed, but category being a ForeignKey field, {{{ for fc in e: fc.category }}} will work here. -- Clément

Re: django generic view object_detail problem

2009-05-06 Thread Clément Nodet
Hi, as mentioned in the tutorial, on generic views ( http://docs.djangoproject.com/en/dev/intro/tutorial04/#use-generic-views-less-code-is-better), your second template will have the variable 'object' in its context (not 'object_detail') So that should work: {% block content %} Building {{

Re: application profiling

2009-05-05 Thread Clément Nodet
Hi there, Had that itch a few days ago, found a few nice snippets for in-browser profiling, using cProfile : http://www.djangosnippets.org/snippets/727/ or using hotshots : http://www.djangosnippets.org/snippets/605/ Also :