changed the handler404 and handler500 to a custom view, passing scope to get proper formed urls when displaying 404 and 500 pages
[{"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 2, "model": "sites.site", "fields": {"domain": "localhost:8000", "name": "localhost:8000"}}, {"pk": 3, "model": "sites.site", "fields": {"domain": "scipy.in", "name": "scipy.in"}}]