ticket:3 model tests
ticket:3 log model
ticket:3 tests for middleware
ticket:3 tests for views
ticket:3 fix log view test
ticket:3 done
Merge branch 't3_middleware'