Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Web Technology by (19.9k points)

Is that possible to see extended dynamic content((link.nameOne,link.nameTwo)) from home.html page on next.html page on By using following code:


<!doctype html>

<html lang="en">






          {% for link in links.all %}


            <a href="{{ link.nameOne }}">{{ link.nameTwo }}</a>


          {% endfor %}



  {% block content %} 

  {% endblock %}





{% extends 'home.html' %}

{% block content %}

  Hello world!

{% endblock %}

1 Answer

0 votes
by (25.1k points)

Yes, it's possible but you have to send context info to the template with same names.

see an example below

def some_view(request):

    context = {'links': links_queryset}

    return render(request, 'nextPage.html', context)

Browse Categories