[Django] #28236: Integrate dj-database-url into Django Core

71 views
Skip to first unread message

Django

unread,
May 24, 2017, 1:11:08 PM5/24/17
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django Core
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
kennethreitz |
Type: | Status: new
Uncategorized |
Component: Core | Version: 1.11
(Other) | Keywords: settings, dj-
Severity: Normal | database-url, database_url
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
dj-database-url gives Django developers two main things:

1. the ability to represent their database settings via a string (a-la
sqlalchemy); very useful for environmnent variables and 12factor apps.
2. 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.

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

Django

unread,
May 24, 2017, 1:36:38 PM5/24/17
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* type: Uncategorized => New feature
* stage: Unreviewed => Someday/Maybe


Comment:

It's better to propose something like this on the DevelopersMailingList
where it'll receive more feedback.

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:1>

Django

unread,
May 24, 2017, 1:51:54 PM5/24/17
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Kenneth Reitz):

Thanks! I'll like to this ticket there.

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:2>

Django

unread,
May 25, 2017, 6:12:34 AM5/25/17
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

[https://groups.google.com/d/topic/django-
developers/G0TtlhH2RUE/discussion django-developers discussion]

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:3>

Django

unread,
May 27, 2017, 6:00:46 PM5/27/17
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tom):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:4>

Django

unread,
Feb 4, 2018, 1:00:35 PM2/4/18
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: nobody
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tom Forbes):

* cc: Tom Forbes (added)
* has_patch: 0 => 1


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:5>

Django

unread,
Feb 12, 2018, 5:21:08 AM2/12/18
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: Tom
| Forbes
Type: New feature | Status: assigned

Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tom Forbes):

* owner: nobody => Tom Forbes
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:6>

Django

unread,
May 28, 2026, 4:57:27 AMMay 28
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: (none)
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* has_patch: 1 => 0
* owner: Tom Forbes => (none)
* status: assigned => new
* ui_ux: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:7>

Django

unread,
May 28, 2026, 5:03:57 AMMay 28
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: (none)
Type: New feature | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* cc: Johannes Maron (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:8>

Django

unread,
Jun 5, 2026, 5:31:42 AMJun 5
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: Johannes
| Maron
Type: New feature | Status: assigned
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johannes Maron):

* owner: (none) => Johannes Maron
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:9>

Django

unread,
Jun 5, 2026, 2:15:21 PMJun 5
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: Johannes
| Maron
Type: New feature | Status: closed
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
| needsnewfeatureprocess
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* resolution: => needsnewfeatureprocess
* stage: Someday/Maybe => Unreviewed
* status: assigned => closed

Comment:

Thanks for the bump. Reading the linked forum thread, the last post says
"shall we wontfix this?" and repoints to a
[https://forum.djangoproject.com/t/settings-refactor/17352 forum
discussion] about a settings refactor. There's also a
[https://forum.djangoproject.com/t/declarative-settings-objects-
roadmap/45047 more recent forum thread] on the sketch of a settings
refactor.

I think the new features process is the next place to go to consolidate
ideas and gather implementers.
--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:10>

Django

unread,
Jun 5, 2026, 2:31:29 PMJun 5
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: Johannes
| Maron
Type: New feature | Status: closed
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
| needsnewfeatureprocess
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):

@Jacob, great, I opened a new-feature ticket and then closed it after
realizing there was an accepted ticket. And now I put a day of work into
it. A little frustrating, to be honest.

The second link you shared isn't public.

The first one mentions an important scope limitation, which I agree with.
The DEP request was mainly regarding loading environment variables.

Are we still testing the new-feature process, or is it the official
default now? Should any accepted feature ticket be closed then?
--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:11>

Django

unread,
Jun 5, 2026, 2:50:05 PMJun 5
to django-...@googlegroups.com
#28236: Integrate dj-database-url into Django
-------------------------------------+-------------------------------------
Reporter: Kenneth Reitz | Owner: Johannes
| Maron
Type: New feature | Status: closed
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
| needsnewfeatureprocess
Keywords: settings, dj- | Triage Stage:
database-url, database_url | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Johannes Maron):

I reopened it, while I still find the back and forth very frustrating,
considering the decade of history on this ticket.

https://github.com/django/new-features/issues/165
--
Ticket URL: <https://code.djangoproject.com/ticket/28236#comment:12>
Reply all
Reply to author
Forward
0 new messages