views:

19

answers:

1

I have content that is going to be the exact same between the mobile and web site. The only thing i want to change is the base template. One base template for the mobile HTML, and one for the website HTML.

One solution is to wrap the render_to_response and determine which HTML to render, but I'd still have two files.

Is there a way I can dynamically tell the template which page to extend?

+2  A: 

Sure, you can just use a template variable as the template name. Try it out! :-)

Justin Myles Holmes
Wow, that's ridiculously simple and I'm kicking myself for not thinking of that. Thanks for pointing me in the right direction.
adam
Every time I have a question with python for which the answer is the most obvious / apparent one, I am reminded of why it is my favorite language. :-)
Justin Myles Holmes