fixed page type test for django < 1.6