0
votes
22
views
Understanding Google reCAPTCHA in Django
posted at July 12, 2018, 3:13 p.m. - 3 months, 1 week ago

Understanding Google reCAPTCHA in Django. I found this awesome answer to simply understand how to use API from Google reCAPTCHA. import urllib, urllib2 def recaptcha(request, postdata): rc_challenge = postdata.get('recaptcha_challenge_field', '') ...

0
votes
22
views
Understanding @user_passes_test Django
posted at July 12, 2018, 3:13 p.m. - 3 months, 1 week ago

Django decorator has a function to manage the user, once of it is user_passes_test. But, in my implementation i found this problem: ERR_TOO_MANY_REDIRECTS, or ‘AnonymousUser’ object is not iterable. I ...

security django python
0
votes
18
views
Django: Custom safe excludes from dangerous XSS Injection
posted at July 12, 2018, 3:13 p.m. - 3 months, 1 week ago

Django Custom safe excludes from dangerous XSS Injection. Answered from: http://stackoverflow.com/a/41434870/6396981 from bs4 import BeautifulSoup from django import template from django.utils.html import escape register = template.Library() INVALID_TAGS = ['script', 'style'] ...