def list_page(request): ip_region = get_region(request.META['REMOTE_ADDR']) if not ip_region: ip_region = MOSCOW_REGION_ID return render_to_response('wlm/list_index.html', { 'region': Region.objects.values('id').get(gibdd_code=ip_region), 'regions': Region.objects.values('id', 'name', 'latitude', 'longitude', 'scale').exclude(pk=MOSCOW_ID), }, context_instance=RequestContext(request))