Re: How to sub-class a CharField for a custom EncryptedCharField

2007-08-02 Thread Marty Alchin
On 8/2/07, z0n3z00t <[EMAIL PROTECTED]> wrote: > In the interest of anyone following this issue, I must confess that my > previous solution broke down the minute I deployed it. What was > interesting was that the `painful thing` - finding the context from > which the __set__ is called, proved an

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-08-02 Thread z0n3z00t
In the interest of anyone following this issue, I must confess that my previous solution broke down the minute I deployed it. What was interesting was that the `painful thing` - finding the context from which the __set__ is called, proved an impossible task without a framework hook. IMHO this s

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-07-26 Thread Marty Alchin
On 7/26/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I'm writing the code at the moment, having had a few > minutes this week to chew over approaches with Jacob and Jeremy Dunck > whilst we were in the same location. I would've loved to be there for that conversation, it sounds like a blas

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-07-26 Thread Malcolm Tredinnick
On Wed, 2007-07-25 at 23:43 +, z0n3z00t wrote: > > That's not a great answer, but in the meantime, you might want to take > > a look at the lazy instantiation in the GIS branch[1]. That code isn't > > exactly what you want, but it might help get you started on a > > descriptor-based approach t

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-07-25 Thread z0n3z00t
> That's not a great answer, but in the meantime, you might want to take > a look at the lazy instantiation in the GIS branch[1]. That code isn't > exactly what you want, but it might help get you started on a > descriptor-based approach to do what you're asking for until there's a > proper soluti

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-07-25 Thread Marty Alchin
On 7/25/07, z0n3z00t <[EMAIL PROTECTED]> wrote: > Does anyone have any idea how I could hook into and change the field's > value as soon as the value gets loaded from the db? This is something that's been raised before, and there were a few ideas proposed. Malcolm's looking over a variety of Fiel

How to sub-class a CharField for a custom EncryptedCharField

2007-07-25 Thread z0n3z00t
I'm trying to create a custom CharField that would encrypt a field's contents before saving to the db, and conversely decrypt the field's values from the db as it loads (using a public key). I want to make sure that the contents of this field is encrypted in the database, but decrypted whenever I