listing objects in a html file

2013-05-28 Thread tony gair
This file is used to print out the name of the premises with an update link , however I wanted to add a list of premises with the in_use flag set to false. Can anyone tell me what I am doing wrong? {% extends "base.html" %} {% block content %} Premises {% unusedpremises = [] %} {% for prem

Re: listing objects in a html file

2013-05-28 Thread Drew Ferguson
Hi I do not think you can include python in django templates so the various uses of "unusedpremises" are ignored You can generate a list of unused premises for the view by over-riding the get_context_data method, perhaps something like this ### view.py class PremisesListView() class = Pre