Click here to Skip to main content
15,617,020 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

from django.shortcuts import render

rooms = [

{'id': 1, 'name': 'Lets learn python'},

{'id': 2, 'name': 'Design with me'},

{'id': 3, 'name': 'Frontend development'},


def home(request):

context = {'rooms': rooms}

return render(request, 'base/home.html', {'context': context})


{% extends "main.html" %}

{% block content %}

<h1>Home Template</h1>



{% for room in rooms %}


<h5>{{}} -- <a href="/room/{{}}">{{}}</a></h5>


{% endfor %}



{% endblock content %}

What I have tried:

when add new h tag outside for it have show out but when move in to for it no show out

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900