On Fri, May 3, 2013 at 10:22 AM, Marc wrote:
Thanks. I understood and that doesn't work for my project as python/django
> can't handle the returned bytes I need to use.
> my project requires that the values are stored using the result of
> aes_encrypt from MySQL because other systems not made in
Thanks. I understood and that doesn't work for my project as python/django
can't handle the returned bytes I need to use.
my project requires that the values are stored using the result of
aes_encrypt from MySQL because other systems not made in python expect that
and cannot be changed at this stag
On Fri, May 3, 2013 at 8:37 AM, Marc wrote:
So Tom: i can't use those methods Shawn pointed out? What I was hoping I
> can do is override the code that builds the SQL query.
> Further looking I think thats correct; as I did get a module working I
> found and played with which uses those methods
I really think django should add an easy way to override what django uses
to build the query for each Field and make it part of the Field settings,
for example:
models.CharField(override_sql_newupdate='AES_ENCRYPT(fieldname,key)',
override_sql_select='AES_DECRYPT(fieldname,key)',...
would be very
So Tom: i can't use those methods Shawn pointed out? What I was hoping I
can do is override the code that builds the SQL query.
Further looking I think thats correct; as I did get a module working I
found and played with which uses those methods and they don't seem to
manipulate the query that is
On Fri, May 3, 2013 at 12:46 PM, Shawn Milochik wrote:
> https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-database-values-to-python-objects
> https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-python-objects-to-query-values
>
> Have a look at the
On Fri, May 3, 2013 at 8:06 AM, Marc wrote:
Thanks, i'll play with that and see what I can come up with.
> Docs are good, but sometimes really hard to read/find what you need :)
>
>
>
>
Oh come on, you mean "get_prep_value" and "to_python" weren't obvious? ;o)
--
You received this message becau
Thanks, i'll play with that and see what I can come up with.
Docs are good, but sometimes really hard to read/find what you need :)
On Fri, May 3, 2013 at 7:46 AM, Shawn Milochik wrote:
>
> https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-database-values-to-python-obj
https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-database-values-to-python-objects
https://docs.djangoproject.com/en/1.5/howto/custom-model-fields/#converting-python-objects-to-query-values
Have a look at these two methods of a custom field. You can pretty easily
make yo
Anyone? I would really like to know who I can modify the query as its being
built so that for a specific field I can set the "field" to
AES_DECRTYP(fieldname,key) on a select and AES_ENCRYPT(fieldname,key) on
insert/update
On Sunday, 28 April 2013 20:21:48 UTC-4, Marc R wrote:
>
> I have a mode
I have a model where I have used AES_ENCRYPT(value, key) to save data in a
MySQL database. It is set as a varbinary field.
So the issue is; when trying to edit the model in Django, it does not
render a widget for the field.
I've tried the aesfield from github but that does some funky thing wit
11 matches
Mail list logo