diff --git a/django_hoptcha/templatetags/hoptcha_tags.py b/django_hoptcha/templatetags/hoptcha_tags.py index 3e024d5..7f515f7 100755 --- a/django_hoptcha/templatetags/hoptcha_tags.py +++ b/django_hoptcha/templatetags/hoptcha_tags.py @@ -1,6 +1,3 @@ -from django import template -from django.conf import settings - """ MIT License @@ -25,6 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from django import template +from django_hoptcha.settings import ( + HOPTCHA_URL, + HOPTCHA_CLIENT_ID, +) + from django.template.loader import render_to_string register = template.Library() @@ -38,7 +41,7 @@ def captcha_placeholder(): @register.simple_tag def captcha_iframe(): context = { - 'captcha_url': getattr(settings, 'CAPTCHA_GENERATE_URL', '#'), - 'public_key': getattr(settings, 'CAPTCHA_PUBLIC_KEY', ''), + 'captcha_url': getattr(settings, 'HOPTCHA_URL', '#'), + 'public_key': getattr(settings, 'HOPTCHA_CLIENT_ID', ''), } return render_to_string('django_hoptcha/captcha_iframe.html', context)