In models.py:
class PUser(models.Model):
phone = models.TextField(blank=True, null=True)
email = models.TextField()
txt = models.TextField(blank=True, null=True)
I want to create Multidimensional Array for that.
For now this is what I have in the function in views.py:
def main(request):
users = []
for i in range (5):
for a in range(3):
users[i][a] = PUser.objects.all()
return render(request, 'main.html', {'users': users})
But I know its not correct, its not working.
How should I edit it?
And how the code in the main.html should be?
I was thinking about something like {{ users[2][3] }} for example. How the code should be? (I have read same questions but was not helpful for me)