views:

42

answers:

0

I'm having some trouble with template inheritance. What I'm trying to achieve is a threaded comment system (using Django's comment framework). This requires comments who's DOM structure virtually identical to be nested. Here's the general layout of the issue:

  1. B and C inherit A

  2. C is nested inside of B (with include)

  3. Template D includes template B inside of itself

However, my local Python runserver crashes in attempts to render page D. My guess is that I'm approaching this all wrong.

I've also tried creating two separate (but identical in content) template files for the B and C templates to inherit from separately, and it worked, but that's not very DRY and I wouldn't like to approach this situation in such a way.

How can I do this properly?