render two template at one time in django

38 views
Skip to first unread message

VIVEK KUMAR

unread,
Dec 11, 2021, 10:25:14 AM12/11/21
to Django users
Respected All,

I want to ask you at one time we render two template in one view.
when you say yes then how ??
And Share please link also.

Thankyou
Vivek 
Mobile No. 981169732

Sebastian Jung

unread,
Dec 11, 2021, 10:38:03 AM12/11/21
to django...@googlegroups.com
Hello,

 I think you csn use render_to_string. Then you cah use it to 2 different Templates and can concat both strings abd return string with httpresponse.

Why do you don't include second template in First template? This is much easier...

Regards

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce9ced00-5b64-45e4-b781-57d48dd1cfb7n%40googlegroups.com.

Harouna Diallo

unread,
Dec 11, 2021, 10:40:27 AM12/11/21
to django...@googlegroups.com
Hello Kumar, you mean conditional rendering?

--
Reply all
Reply to author
Forward
0 new messages