Re: Find duplicates with regex

2015-01-25 Thread Stephen J. Butler
The benefit to doing stuff like this in the database is that the database can do it smarter than you can in Python. Is that true in this case? I think not. If we were talking raw MySQL I'd suggest running your Website column through something like REPLACE(Website, '://www.', '') and then the count

Re: CSRF verification failed. Request aborted.

2015-01-24 Thread Stephen J. Butler
Have you checked the rendered HTML in the browser? Is the CSRF element present? Is there any JavaScript that could be doing pre-processing on the form? Did you open up the browser's inspector and verify that the POST request actually included the CSRF key/value? Is it the correct value? On Sat,

Re: django select extremely slow on large table

2015-01-23 Thread Stephen J. Butler
2000 is AL16UTF16. But since there should be a non-lossy conversion between AL32UTF8 and AL16UTF16 you'd think that Oracle would perform it and use the index. Puzzling. Furthermore, when you look in the Oracle db driver you can see in base.py where it sets NLS_LANG to ".UTF8". This is an old

Re: django select extremely slow on large table

2015-01-23 Thread Stephen J. Butler
Could it be a character set issue? That is, perhaps the database NLS_CHARACTERSET is not unicode friendly, your column is VARCHAR instead of NVARCHAR2, and Django is sending unicode instead of the native database charset (which cx_Oracle directly might use). I'm just brainstorming on what might

Re: Authentication when usernames are not unique

2015-01-19 Thread Stephen J. Butler
Shibboleth 2.0 lets you setup a discovery service (or portal would perhaps be a better term) letting the user select which ID Provider (IdP) they will authenticate to. All you have to do on the Service Provider (SP) side is specify the discovery URL and what IdPs you allow. Nothing needs to be

Re: Authentication when usernames are not unique

2015-01-19 Thread Stephen J. Butler
Just as a case study, Shibboleth does this by having unscoped and scoped usernames. The scoped username should be globally unique and takes the form of "u...@school1.edu". Unscopped is not globally unique, but unique for a particular scope (ie: "user"). It's temping to say "ahh... email address!"

<    1   2