djangosnippets.org: Latest snippets tagged with 'direct_to_template'https://djangosnippets.org/tags/direct_to_template/2011-11-01T14:58:18.781146-05:00Automatically create urls for templates in a directory
2011-11-01T14:58:18.781146-05:00blackrobothttps://djangosnippets.org/snippets/2588/<p>When developing a site, I sometimes want to be able to visually reference the HTML before it's given a real context, and a view. This extra bit of code will allow you to add a directory within your templates dir, and pull any html files and subdirectories from it. I …</p>
Freely redistributableCheap direct_to_tempalte patterns
2008-11-14T16:47:28.117951-06:00jjdelchttps://djangosnippets.org/snippets/1190/<p>Django cheap-pages</p>
<p>Methods to use when you just want to use the Django dispatcher and there will be no extra business logic in your pages.</p>
<p>In some cases flatpages is too flat, and store templates in DB is too much hassle</p>
<pre><code> >>> url(^name/$,
... direct_to_template,
... {'template': 'name.html'},
... name='name') …</code></pre>
Freely redistributable