Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango included template's get doesn't get called
    primarykey
    data
    text
    <p>In my django application, I created a base template with some navigation items. I also {{ included }} another template that contains a form. I'd like this to be available on every page. This form template has a view that populates some elements from the database and I do this in view.get. But I discovered when I just {{ include }} the template, its view's get isn't ever called. </p> <p>finances/base.html is the base template finances/month_list.html is the template I'd like to include</p> <p>base.html looks like:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;PFM&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="navigation"&gt; &lt;a href= "{% url 'finances:current_month' %}"&gt;Home&lt;/a&gt;&lt;!--this month's transactions--&gt; &lt;a href= "{% url 'finances:accounts' %}"&gt;Liability Details&lt;/a&gt;&lt;!--liability account details--&gt; &lt;a href= "{% url 'finances:accounts' %}"&gt;Asset Details&lt;/a&gt;&lt;!-- asset account details--&gt; &lt;a href= "{% url 'finances:create' %}"&gt;New Account&lt;/a&gt;&lt;!-- create an account--&gt; &lt;/div&gt; &lt;div class="content"&gt; {% block content %} {% endblock %} &lt;/div&gt; &lt;br/&gt; &lt;div class="bottom_nav"&gt; {% include "finances/month_list.html" %} &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The rest of the code can be found here: <a href="https://gist.github.com/shelbydz/6001359" rel="nofollow">https://gist.github.com/shelbydz/6001359</a> (it's a lot of code, I hope linking it is okay)</p> <p>Thanks,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload