https://devhubby.com/thread/how-to-use-for-loop-in-django-views.