Use attributes instead of toJSON for passing data to view template

Signed-off-by: Geoff Lane <geoff@zorched.net>