get obj_type from db_table
removed unneeded .__class__
Merge pull request #560 from church29/fix_view_tests

fixes broken view tests. All tests pass.