Default keys from settings #3

Merged
1 commit merged into from Oct 28, 2010

Projects

None yet

2 participants

@powderflask

Hey,
great module - nicely thought out. I was 2 hours into mod'ing django-contact-form into a plugin when I thought... someone's done this before... this one is much better!

One issue I had was with asking for the recaptcha keys on the contact plugin admin form :

  1. if the site has several contact forms (say for different depts. or people), it's a pain, and error prone to keep those in sync.
  2. if my client wants to add a contact form, i don't want him/her to have to think about keys (and get them wrong, and get frustrated... you know ;-)
  3. Most compelling: since those keys are tied to a domain, they won't work in all environments (dev, stage, prod.)

I do like your idea - it makes it very simple to install and use in basic cases (one form, global key), but thought it would be good if one could optionally configure the keys in the settings file. The idea would be that if the settings are found, the keys are left off the form and are not stored in the model.

This pull gets most of the way there. I choose the settings names to match those used by glamkit-spamstop. Seems to work.

I've got one issue (the fields are still showing up, but optional, not sure why), and could apply same idea to Akismet, but wanted to check with you if you think this is worthwhile and if their might be a better approach before I spend more time on it.

thanks again for a really great, flexible plugin.
P.S. I'm new to github - this is my first pull request - hope this is the appropriate method, take it easy on me if I'm out in left field ;-)

@maccesch
Owner

Hey,
thanks for your ideas. This is the absolutely right way to do this :)

You are right, being able to configure keys in the settings file is a useful feature. in glamkit stopspam you can do this. I will look into it.

@maccesch
Owner

Hey again, I just wanted you to know, that you can set now ReCAPTCHA and Akismet keys in the settings file. The keys input fields then won't show up in the admin.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment