@require_admin
def zone_redirect(request):
 device = Device.get_own_device()
 zone = device.get_zone()
 return HttpResponseRedirect(reverse('zone_management', kwargs={'zone_id': ((zone and zone.pk) or 'None')}))

@ require_admin def zone_redirect ( request ) : device = Device . get_own_device ( ) zone = device . get_zone ( ) return HttpResponseRedirect ( reverse ( 'zone_management' , kwargs = { 'zone_id' : ( ( zone and zone . pk ) or 'None' ) } ) )
dummy view to generate a helpful dynamic redirect to interface with control_panel app .