Hi Vernon, Here's my feedback. (It turns out to be quite similar to Michael's.)
> 1) Assume that a Proxy based connection will be acceptable for inclusion in > django? It seems to me that a custom database backend could handle this: - subclass an existing backend - override the implementation of get_connection_params / get_new_connection / init_connection_state (on master; IIRC the API was different in 1.5) - set it as your ENGINE. The API of database backends is private, because there's a lot of refactoring in this area, and it tends to change at each minor version. But it isn't too difficult to keep up with the changes, especially if you override just a few methods and don't need to support multiple versions of Django with the same code. Although imperfect, the concept of database backends is an abstraction that is known to work, and it looks like it provides a solution to your problem. I couldn't extract from your email another general purpose abstraction useful with any database. Your proposals sound quite specific, and better handled by code than configuration. > 2) Add more keys to the DATABASES entries as needed by different backends? > (e.g. "CONNECTION_STRING": "xxx", "PROXY_ADDRESS: "10.0.0.7") Yes, a database backend can document that it accepts or even requires some specific settings. The Oracle backend already has a few such settings (TEST_CREATE, etc.) > 3) Pass the DATABASES dictionary down-chain to the proxy? (so it gets the > USER & PORT items, etc. and can process them itself) If the proxy is a custom database backend, this information is available in self.settings_dict. > 4) Have the proxy have additional routing information so it can add its own > intellegence to the connection attempt? If the proxy is a custom database backend, it can do anything. > 5) (In some future time) have the backend feed back more information to the > core, such as "I am connected to an XYZ engine, switch to the XYZ dialect of > SQL'? If I wanted to support connecting to various databases from Django through ODBC, I would write an ODBC mixin handling the connection to the database, and for each database I would create a custom backend inheriting Django's backend and the ODBC mixin. I hope this helps; let me know if I missed something and you cannot achieve your goals with a custom database backend! -- Aymeric. -- 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 django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.