Opened 8 years ago
Last modified 7 years ago
#28236 assigned New feature
Integrate dj-database-url into Django
Reported by: | Kenneth Reitz | Owned by: | Tom Forbes |
---|---|---|---|
Component: | Core (Other) | Version: | 1.11 |
Severity: | Normal | Keywords: | settings, dj-database-url, database_url |
Cc: | jacobian@…, Tom Forbes | Triage Stage: | Someday/Maybe |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
dj-database-url gives Django developers two main things:
- the ability to represent their database settings via a string (a-la sqlalchemy); very useful for environmnent variables and 12factor apps.
- it will automatically use the DATABASE_URL environment variable, if present.
I'm not sure if #2 is appropriate for Django Core (but it would be nice, as Gunicorn supports both PORT and WEB_CONCURRENCY), but I know #1 is perfect. This plan has previously been discussed (at a conference, DjangoCon EU in Zurich, long ago) and approved by JKM, before his role at Heroku, if that is helpful information.
I think this change would vastly improve the usability of Django, and would be an excellent and simple move for the project.
Many thanks for your consideration. <3
--
Kenneth Reitz
P.S. There is no "Settings" component in the issue tracker, that I can find.
Change History (6)
comment:1 by , 8 years ago
Summary: | Integrate dj-database-url into Django Core → Integrate dj-database-url into Django |
---|---|
Triage Stage: | Unreviewed → Someday/Maybe |
Type: | Uncategorized → New feature |
comment:4 by , 8 years ago
I've made an initial PR: https://github.com/django/django/pull/8562
I copied most of the 'guts' of the library and fixed up all the tests.
I don't think this is anywhere near ready to merge, but I like the idea and I thought I would take the first step and propose one way to integrate the library.
comment:5 by , 7 years ago
Cc: | added |
---|---|
Has patch: | set |
I've removed the WIP from my branch as I think the implementation is ready to be discussed. I've got all tests to pass and a mechanism for configuring both the caches and the databases via URLs.
comment:6 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
It's better to propose something like this on the DevelopersMailingList where it'll receive more feedback.