My thoughts are the same as Shai's below. On Monday, May 29, 2017 at 4:00:09 PM UTC-4, Shai Berger wrote: > > If I understand things correctly, registration of new url-schemas to > enable > something like dj-database-url to support 3rd parties should be a trivial > matter; just add an entry to some dictionary, with the schema as key, and > the > dotted-path of the backend as value. > > IMO, scanning INSTALLED_APPS, or relying on ready(), is a lot of over- > engineering for this. Just do the registration from the settings file, > before > invoking the url-parsing mechanism: > > from django.database_url import register_backend, configure_db > > register_backend('pyodbc-azure', 'sql_server.pyodbc') > > DATABASES = {'default' : configure_db() } > > The only barrier I see is namespacing -- the functions mentioned above > cannot > live in django.conf (would cause a circular import if imported from the > settings module) nor django.db (which shouldn't be imported too early), > and > that's why I wrote `django.database_url` above. > > What am I missing? >
-- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/065601c3-9488-42aa-8b23-c7f906c26b5a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.