Use django.shortcuts.redirect instead of own resolving