On Wednesday, August 7, 2013 5:22:29 PM UTC+10, Anssi Kääriäinen wrote: > > On Monday, August 5, 2013 8:02:52 AM UTC+3, Jani Tiainen wrote: >> >> Hi, >> >> You seem to found kind of an issue which happens with GeoDjango part as >> well. Most of the geodjango operations require quite heavy to/from data >> mangling while reading and/or writing data. >> >> Currently there isn't clean solution to tell (per field) how data should >> be treated per backend. Django ORM works pretty well for a primitives like >> numbers, strings and such but when it goes to complex datatypes (like your >> encrypted field). >> >> It would be really useful to have something to allow data mangling on a >> when reading/writing data from/to database per backend basis. Unfortunately >> such a feature isn't easy to implement due the current way how ORM works. >> >> If you require such a functionality now, you should take a look how >> different GeoDjango backends deal with the similiar problem. >> > > I agree that there is room for improvement in how data conversions in the > ORM work. If I recall correctly different backends work slightly > differently, and when to_python() is called isn't consistent. Improvements > in this area are welcome. > > For the original use case I think it would be better to do the encryption > already in the original SELECT. I am not sure if there is any easy way to > do that currently... > > - Anssi >
Yes, doing it in the SELECT would be even better in this case, since then the encrypted data wouldn't ever have to reach Python, but I didn't see any easy way to do that (although I must admit I was trying to steer clear of the SQL compiler section) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
