on the development server http://stackoverflow.com/questions/8023126/how-can-i-test-https-connections-with-django-as-easily-as-i-can-non-https-connec ✓ More easier when used with a “real” web server (Apache) ➡ See the forthcoming lecture on “Deploying a Django app”
object.raw method escapes all values in the list passed as argument Person.objects.raw('SELECT * FROM myapp_person WHERE last_name = %s', [request.POST[‘name’]) Person.objects.raw('SELECT * FROM myapp_person WHERE last_name =' + request.POST[‘name’])
automatically escaped when used as template variables {% autoescape off %} ... {% endautoescape %} {{ var1|safe }} Be cautious when doing that, do not do it on variables that are tainted with user inputs! But if you do not want to escape template variable or
POST requests from django.core.context_processors import csrf def index(request): c = {} c.update(csrf(request)) return render('HelloSecure/index.html',c) HelloSecure/views.py