Skip to content Skip to sidebar Skip to footer

Django: Pythons Os.scandir Next() Method Not Working Inside Template

I have the following code in the views.py def gallery(request): import os, sys img_list2 = os.scandir('/home/shared/testing') return render(request,'blog/gallery.html',

Solution 1:

You're not using Jinja2; you're using the Django template language, where it's invalid syntax to call functions with parameters.


Post a Comment for "Django: Pythons Os.scandir Next() Method Not Working Inside Template"