google-code-export / django-simple-captcha

Automatically exported from code.google.com/p/django-simple-captcha
MIT License
0 stars 0 forks source link

add CAPTCHA_SERVER or similar. #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i have a need for specifying a server for the captcha images, and audio. 
following are the 
changes necessary to make this happen. thank you for your consideration.

add the following line to conf/settings.py:
CAPTCHA_SERVER = getattr(settings,'CAPTCHA_SERVER', '')

change line 44 in fields.py to:
ret = '<img src="%s" alt="captcha" class="captcha" />' % ( 
settings.CAPTCHA_SERVER + 
reverse('captcha-image',kwargs=dict(key=key)) )

change line 46 in fields.py to 
self.image_and_audio = '<a href="%s" title="%s">%s</a>' %( ( 
settings.CAPTCHA_SERVER + 
reverse('captcha-audio', kwargs=dict(key=key)) ), unicode(_('Play captcha as 
audio file')), 
self.image_and_audio)

matt

Original issue reported on code.google.com by mazatty@gmail.com on 12 Mar 2010 at 4:27

GoogleCodeExporter commented 9 years ago
Am I correct in assuming that the goal of this change would be to separate the 
image generating code part from 
the django installation handling the form? 

Care to explain how this would work, shed some light on the architecture? 

Ty.

Original comment by mbonetti on 13 Mar 2010 at 7:22

GoogleCodeExporter commented 9 years ago
Closing for lack of feedback. Feel free to reopen if you still care for this.

Original comment by mbonetti on 16 Feb 2011 at 3:44