here is the output from $python manage.py shell
>>> a=Mocument.objects.all()
>>> a
[<Mocument: abc.xlsx>, <Mocument: 1.csv>, <Mocument: ok.csv>, <Mocument: 11.csv>, <Mocument: 12.csv>]
>>> a[0]
<Mocument: abc.xlsx>
>>> for i in a:
... print i
...
here is the output
abc.xlsx
1.csv
ok.csv
11.csv
12.csv
till here all great. problem starts when i try to retrieve data in HTML template. here is my html file code
<html>
<head>
<meta charset="utf-8">
<title>Minimal Django File Upload Example</title>
</head>
<body>
<!-- List of uploaded documents -->
{% a=Mocument.objects.all() %}
{% for i in a %}
<p>{% print i %}</p>
{% endfor %}
</body>
</html>
here is the Error details
Error:-------------------- Exception Value: Invalid block tag: 'a=Mocument.objects.all()'
please help.