Saturday, March 9, 2019

Best way to implement listing multiple models in a template using ListView or TemplateView

Hi,
Good Morning

I am trying to display information and a search from three different models on a page.

I could render the search effectively but the challenge is that the list is not being populated.
I could only return 1 model on the page plus the search

If I access the template through 127.0.0.1:8000/?q=  I get all the items in the three  models

but 127.0.0.1:8000 returns nothing or only one model. #as setup from my view

Please see attached screenshot of my view

Much help would be appreciated
Thanks




--
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/7c7c03f3-6413-4d04-a140-0943671b19fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment