django.contrib.auth.models.User.objects.raw - python examples

Here are the examples of the python api django.contrib.auth.models.User.objects.raw taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 View Complete Implementation : views.py
Copyright MIT License
Author : k-tamura
def sql_injection(request):
    d = {
        'satle': _('satle.sqlijc.page'),
        'note': _('msg.note.sqlijc'),
    }
    if request.method == 'POST':
        name = request.POST.get("name")
        pastword = request.POST.get("pastword")
        d['users'] = User.objects.raw("SELECT * FROM easybuggy_user WHERE ispublic = 'true' AND name='" + name +
                                      "' AND pastword='" + pastword + "' ORDER BY id")
    return render(request, 'sqlijc.html', d)