Re: Different models in child and Parent Templates

2017-05-02 Thread chuck . horowitz
So what would you like the ContactView to populate *into *the nav bar? Without a data model, there is nothing to render. Remember that {% include 'blog/navbar.html' %} will not access/render that "url", it will simply paste in the contents of that file(template) into the template before

Re: Different models in child and Parent Templates

2017-05-02 Thread jithu s jacob
{% include 'blog/navbar.html' %} RECENT POSTS {%block content %} {% endblock%} class HomeView(ListView): template_name='blog/home.html' model=Blog class BlogView(DetailView): template_name='blog/blog.html' model=Blog class

Different models in child and Parent Templates

2017-05-01 Thread chuck . horowitz
Please be more specific about your issue. How are you rendering your templates? Can you paste into a response your views.py and urls.py for the relevant apps? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Different models in child and Parent Templates

2017-05-01 Thread jithu s jacob
I am using parent template as base which has a side nav bar. the child template keeps changing with clicking of buttons. My child template changes correctly with call to different views through the URLs. Now I want to add some data from model i the parent template irrespective of the