Commit 089f3895 authored by Cheska Hung's avatar Cheska Hung

added for loop to access database

parent b0fff2d8
...@@ -4,11 +4,16 @@ ...@@ -4,11 +4,16 @@
<Head> <Head>
<h1>Welcome to Widget!</h1> <h1>Welcome to Widget!</h1>
</Head> </Head>
{{% block content %}}
<h2>WIDGET USERS</h2> <h2>WIDGET USERS</h2>
<body>{{Department.dept_name}}{{Department.dept_unit}}</body> <ul>
{% for Department in object_list %}
<li>{{Department.dept_name}}, {{Department.home_unit}}</li>
{% endfor %}
</ul>
{{% endblock content %}}
</HTML> </HTML>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment