Opened 9 years ago

Closed 8 days ago

Last modified 8 days ago

#28236 closed New feature (needsnewfeatureprocess)

Integrate dj-database-url into Django

Reported by: Kenneth Reitz Owned by: Johannes Maron
Component: Core (Other) Version: 1.11
Severity: Normal Keywords: settings, dj-database-url, database_url
Cc: jacobian@…, Tom Forbes, Johannes Maron Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (12)

comment:1 by Tim Graham, 9 years ago

Summary: Integrate dj-database-url into Django CoreIntegrate dj-database-url into Django
Triage Stage: UnreviewedSomeday/Maybe
Type: UncategorizedNew feature

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

comment:2 by Kenneth Reitz, 9 years ago

Thanks! I'll like to this ticket there.

comment:4 by Tom Forbes, 9 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 Tom Forbes, 8 years ago

Cc: Tom Forbes 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 Tom Forbes, 8 years ago

Owner: changed from nobody to Tom Forbes
Status: newassigned

comment:7 by Johannes Maron, 2 weeks ago

Has patch: unset
Owner: Tom Forbes removed
Status: assignednew
UI/UX: unset

comment:8 by Johannes Maron, 2 weeks ago

Cc: Johannes Maron added

comment:9 by Johannes Maron, 9 days ago

Owner: set to Johannes Maron
Status: newassigned

comment:10 by Jacob Walls, 8 days ago

Resolution: needsnewfeatureprocess
Status: assignedclosed
Triage Stage: Someday/MaybeUnreviewed

Thanks for the bump. Reading the linked forum thread, the last post says "shall we wontfix this?" and repoints to a forum discussion about a settings refactor. There's also a 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.

comment:11 by Johannes Maron, 8 days ago

@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?

Version 0, edited 8 days ago by Johannes Maron (next)

comment:12 by Johannes Maron, 8 days ago

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

Note: See TracTickets for help on using tickets.
Back to Top