Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateDoesNotExist error (captcha/widget.html) #27

Open
KalobTaulien opened this issue Jan 6, 2019 · 8 comments
Open

TemplateDoesNotExist error (captcha/widget.html) #27

KalobTaulien opened this issue Jan 6, 2019 · 8 comments

Comments

@KalobTaulien
Copy link

My site is Running Django 2.1 and Wagtail 2.4 and I get a TemplateDoesNotExist error and it's trying to load captcha/widget.html.

What I found was if you add captcha to your settings file (along with wagtailcaptcha) it solves this problem.

It'd be great if you through this in your main README.md file to help any newcomers get this up and running faster. #

@DanielSwain
Copy link
Contributor

@KalobTaulien Thanks for your comment. I had the same problem and adding captcha to INSTALLED_APPS fixed it for me too. However, even though I've created a reCAPTCHA v2 key set, I am getting the "reCAPTCHA V1 IS SHUTDOWN message". Would you happen to know how to solve this problem?

@KalobTaulien
Copy link
Author

KalobTaulien commented Jan 21, 2019

Hey @DanAtShenTech

I managed to fix this by setting NOCAPTCHA = True. My captcha still displays, but it displays the right one now (click** (LOL typo) instead of text deciphering).

It also good Google a while to allow localhost from some reason. 🤔

@DanielSwain
Copy link
Contributor

DanielSwain commented Jan 21, 2019

Thanks @KalobTaulien. That solved the problem. I now have the click interface. Also, I don't quite understand the second paragraph of your comment above.

@KalobTaulien
Copy link
Author

@DanAtShenTech edited. Was a typo, my bad.

For the recpatcha settings I've had to wait ~45 minutes for Google to update to allow localhost urls with recaptcha. The site worked on staging and prod and later they must have updated their records because localhost worked later. This caused quite the headache. It has nothing to do with this repo, but for local development when you add localhost to allowed domains you might need to wait a while for the changes to propagate before continuing work.

This has happened a few times in a row now (for me at least)

@DanielSwain
Copy link
Contributor

Thanks for the clarification @KalobTaulien. One thing that I do for local development which might be useful to you - I'm on Windows and I set up local development domains in my hosts folder. I started this to have my password manager automatically fill in forms, but it's also useful if I'm testing for hostname. I just prefix the domain name with "dev.":

From my hosts file:

# Map all dev domains to localhost (used mostly for having passwords filled in for specific domains when prompted by LP)
127.0.0.1  dev.somedomainname.com

@wimfeijen
Copy link

setting NOCAPTCHA = True did not help for me. Adding captcha to INSTALLED_APPS however, did work out! Thanks for the explanation KalobTaulien!

@Pithikos
Copy link

Pithikos commented Apr 2, 2024

For newer versions, add django_recaptcha instead of captcha

@Esosek
Copy link

Esosek commented Aug 19, 2024

For newer versions, add django_recaptcha instead of captcha

Thank you so much, I was trying to make this work for hours using the captcha module and this solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants