-
Notifications
You must be signed in to change notification settings - Fork 324
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
Session store #86
base: master
Are you sure you want to change the base?
Session store #86
Conversation
Hi, thank you, this looks interesting! What are the advantages of storing the captcha in the session instead of the database? Performance? Also, would you consider including a couple tests, covering the bits affected by the patch? Cheers. |
Hi, and thanks for useful captcha app. It should have better performance with some sessions settings (Memcached sessions for example). I'll write additional tests after passing all of Travis' checks. |
b1bf212
to
2682e36
Compare
upd: minor fixes and few tests. It would be nice if you could add this code to the installation package. |
Hi, just an update on this: I'm working on this pull request, but it's more complicated than it seems. Basically what I'd like to do is set |
Hi. |
Are you going to aprove this PR? The feature seems interesting to have... |
@ealogar not in its current state, sorry. |
@mbi Thanks for your response, |
@ealogar sure, granted it comes with tests and everything that currently relies on the Django ORM still works :) |
@mbi I am working on it. I will add a test with an in-memory storage dao. Up to people the dao they provide, just fine if they follow The BaseCaptchaDao duck-typing |
I see that there is another implementation (but using cache instead) in #103. Probably something combined from both will be very good. |
Any update on this or on #103 ? I would very much prefer to use anything other than the database to store the captchas temporarily or better yet redesign the app to not even need to store the captchas at all somehow? Storing it in cache might also be costly to the hardware especially if there is not a caching invalidation strategy. |
CAPTCHA_STORE setting added.
CAPTCHA_STORE = 'DB' (default). Captcha info stored in CaptchaStore model (same as before).
CAPTCHA_STORE = 'SESSION'. Captcha info stored in SessionStore (sessions should be enabled).
Known issue: django will made new migration after changing CAPTCHA_STORE setting and running makemigrations.
upd: django 1.4 compatible.