вот так передаю в шаблон данные
def index(request): if 'q' in request.POST: q = request.POST['q'] return render_to_response('index.html', q) else: return render_to_response('index.html', {'q': 'error'} )
{{ q }} <form action="" method="POST" /> {% csrf_token %} <input type="text" name="q" /> <input type="submit"> </form>
помогите пожалуйста