Fix settings
This commit is contained in:
parent
ce3d758343
commit
2beca59775
@ -1,6 +1,3 @@
|
|||||||
from django import template
|
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
@ -25,6 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from django import template
|
||||||
|
from django_hoptcha.settings import (
|
||||||
|
HOPTCHA_URL,
|
||||||
|
HOPTCHA_CLIENT_ID,
|
||||||
|
)
|
||||||
|
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
@ -38,7 +41,7 @@ def captcha_placeholder():
|
|||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def captcha_iframe():
|
def captcha_iframe():
|
||||||
context = {
|
context = {
|
||||||
'captcha_url': getattr(settings, 'CAPTCHA_GENERATE_URL', '#'),
|
'captcha_url': getattr(settings, 'HOPTCHA_URL', '#'),
|
||||||
'public_key': getattr(settings, 'CAPTCHA_PUBLIC_KEY', ''),
|
'public_key': getattr(settings, 'HOPTCHA_CLIENT_ID', ''),
|
||||||
}
|
}
|
||||||
return render_to_string('django_hoptcha/captcha_iframe.html', context)
|
return render_to_string('django_hoptcha/captcha_iframe.html', context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user