removed unused import
indentation of template
removed comments
refactorings
used select_related to reduce queries
performance improvements