added debug output
added django template helpers