Refactored python module view to be compatible with templates