def register(request): if request.method != 'POST': return render_to_response( 'register.html', context_instance=RequestContext(request), ) tag = req2url2tag(request, log) return render_to_response( 'register.html', dict(tag=tag), context_instance=RequestContext(request), )
def register_ajax(request): assert request.method == 'POST' tag = req2url2tag(request, log) return HttpResponse(dumps(tag), mimetype="application/json")