How many Django'ers out there typically use DSNs for their web apps?
How are you currently working around Django's lack of DSN support?

I'm still new to Django, looking to migrate some existing apps to
Django plus start new ones, but without DSN support out of the box
it's almost a show stopper.  I submitted a patch for this but it was
rejected for various reasons so I wanted to open up a discussion about
it to see what other opinions there are.  Take a look at the thread,
there are some valid points :

http://code.djangoproject.com/ticket/1810

I still think DATABASE_DSN should be an option in settings.py though.
Here is why.  I build web apps that need to run in many environments
(dev, stage, production, etc). Also, at my company we use sandboxed
postgres (every user has his own database, named $USER) on our main
dev server for better isolation. This means we pretty much have to set
database settings as envionment variables. Not only does this
adequately decouple the envionment from the code it also keeps
sensitive info out of the code repository (better security).  if you
wanted to, say, refactor an app so that a portion of it was re-usable
and open-sourceable the latter helps when salvaging svn history.

In the current Django way here are my options to accomplish the above:

   1. make a parse_dsn() function (since builtin urlparse doesn't
handle user:pass splits) and carry it around with me on every django
app I write.  bah.
   2. make an env var for *every* database setting. That is
potentially 6 env vars for a single application you have to set. When
a new developer wants to work on one of my company's apps, that is an
additional 6 env vars she would have to add to her profile. And say
she is working on 3 django apps this week. That's 18 env vars! ouch!!
maintenance nightmare.

Opinions?  do DSNs overcomplicate Django?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to