......
class Upload:
....
def get_files(self, folder_name, id):
path = self.get_path(folder_name, id)
.......
return images
else:
return False
..............
{% for new in news %}
<div class="news">
<div class="news-title">{{ new.title }}</div>
{{ new.short_text }}
{{ Upload.ge_files('news', new.id}}
{% endfor %}