#30178: Support duck-typing for database passwords in settings
-------------------------------------+-------------------------------------
     Reporter:  Dan Davis            |                    Owner:  Dan Davis
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  2.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  oracle               |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Dan Davis):

 Replying to [comment:7 Adam (Chainz) Johnson]:
 > This isn't necessary. Instead of having a duck-typed object to replace
 the password string, you can use a duck-typed `dict` for the settings in
 `DATABASES`, something like:

 That's a great idea.   It gets around the need to implement a new backend
 for each such supported database, which is not as easy in Django as it
 could be, and allows us to return a clean string.    It also delivers the
 benefits I suggested to one of my colleagues (e.g. the guy who asked me to
 file this ticket, actually) of reducing boilerplate in our own settings
 files.

 I'll close this once I've succeeded and convinced my colleagues. His
 reservation will be the 20 or so django projects that will need to change
 said boiler plate.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30178#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.a6c3ad7d9efa1de6c2593456ea1f2a60%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to