this is my views.py
def sms(request):
obj = Sms.objects.all()
return render(request, 'advisory.html', {'sms': obj})
and this is on my html.
{% for i in sms %}
<tr>
<td>{{ i.description }}</td>
<td>{{ i.timestamp }}</td>
</tr>
{% endfor %}
this is the model
class Sms(models.Model):
description = models.CharField(max_length=100, blank=True)
timestamp = models.DateTimeField(auto_now_add=True)
And i don't really know why its not returning any data from my model. please help! thanks
question from:https://stackoverflow.com/questions/65945317/table-not-displaying-a-data-from-model