<s> from __future__ import absolute_import <EOL> from django . shortcuts import get_object_or_404 <EOL> from django . conf import settings <EOL> from django . shortcuts import render_to_response <EOL> from django . template import RequestContext <EOL> from yandex_maps . models import MapAndAddress <EOL> def yandex_map ( request , map_id ) : <EOL> map = get_object_or_404 ( MapAndAddress , id = map_id ) <EOL> api_key = settings . YANDEX_MAPS_API_KEY <EOL> ctx = RequestContext ( request , { <EOL> '<STR_LIT>' : map . longitude , <EOL> '<STR_LIT>' : map . latitude , <EOL> '<STR_LIT>' : api_key , <EOL> '<STR_LIT>' : <NUM_LIT:15> , <EOL> '<STR_LIT:address>' : map . address , <EOL> } ) <EOL> return render_to_response ( '<STR_LIT>' , ctx ) </s>
