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
|
||||
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user