I'm working on a Django project template to be used by a sub-department of 
my employer.   We are an Oracle shop, and make reasonably heavy use of 
Oracle's XMLType.    Another issue that has come up is encryption.   It is 
trivial to create an EncryptedTextField field type.   What I want to do is 
related to my solution for Oracle's XMLType:

For both my EncryptedTextField and XMLTypeField, I want to to alter the SQL 
that will be generated to query, insert, and update the field so that 
XMLType field will be converted to a CLOB or text value with 
.getClobValue() function.   Similarly, I want the value to save to be 
generated from calling AES_Encrypt() with the project's secret key and to 
be decrypted by calling AES_Decrypt().   The benefit of using the database 
encryption/decryption functions should be clear enough - encryption and 
decryption is offloaded from the application, and the programmer is assured 
of being able to see the values by constructing a simple view.

May I alter the way a query is constructed using a custom Field class in 
this way?    If so, can anyone provide an example?

Finally, if I don't have to do this work, and Django ORM already supports 
Oracle XMLType through cx_Oracle, please let me know ... Dr. Google was 
unable to help me, and I know my boss wants to stick with Django as much as 
he can because he has to bring 25+ programmers with me into Python/Django.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a95d85fe-147e-484a-8064-c56ec9bb44ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to