Sunday, April 30, 2017

Different models in child and Parent Templates

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 view/model  or URL being called in the child template.

is there any easy was to do this.

for now I am writing additional context variables for parent template for all the child views. But this is not feasible

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1f158305-4841-49ff-b2c8-9e2352418283%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment