Opened 13 years ago

Closed 12 years ago

#15095 closed New feature (fixed)

django-admin.py createconfig /path/to/settings.py

Reported by: Frank Wiles Owned by: nobody
Component: Core (Management commands) Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Toss this in as I think it's a good idea. I often don't use django-admin.py startproject, for a variety of layout reasons, but would like to be able to just generate a base settings file on a regular basis. This path adds a command that does just that and nothing more.

Attachments (1)

createconfig.diff (1.3 KB ) - added by Frank Wiles 13 years ago.
Patch

Download all attachments as: .zip

Change History (10)

by Frank Wiles, 13 years ago

Attachment: createconfig.diff added

Patch

comment:1 by Jannis Leidel, 13 years ago

Triage Stage: UnreviewedDesign decision needed

I'm not sure if we should add more boilerplate generating management commands, to be honest, e.g. startproject has shown its limitations and this can easily be added to 3rd party apps like django-extensions.

comment:2 by Frank Wiles, 13 years ago

Totally understand if this is better suited to django-extensions, I know personally that I wish I had this command at least once a month and assume others do as well. One reason it might be better suited to django core is that it might be useful in docs/howtos/tutorials for explaining settings, setting up projects (outside of startproject obviously) without requiring that django-extensions be installed for new users.

comment:3 by Alex Gaynor, 13 years ago

At DjangoCon.eu last year Jacob and I discussed an idea for a management command that created things from various templates that could be provided (e.g. via VCS, or installed packages and stuff), so you could provide custom createapp, startproject, or even more fine grained like createmangamentcommand. It was just a thought but if someone wanted to prototype that in an external app I think it would be an interesting idea to explore.

comment:4 by Russell Keith-Magee, 13 years ago

I'm inclined to agree with Frank that this sort of thing is well suited to core; settings.py is the one part of startproject that isn't trivial to reproduce manually (unlike, say, most of startapp's functionality). It it could be templated/configured like Alex describes, that would be an added bonus.

IMHO, this would ideally land in parallel with revisions to the tutorial etc that describe best practices for building projects that aren't bound to the tutorial's current "project directory containing apps" focus. Of course, this would force us to actually make some recommendations as to what constitutes best practice :-)

comment:5 by James Addison, 13 years ago

Severity: Normal
Type: New feature

comment:6 by joshua.bonnett@…, 13 years ago

Easy pickings: unset

It would be very very useful for 3rd party libs(blogs, cms's, stores) to be able to use this to provide their own boiler plate.

in reply to:  6 comment:7 by joshua.bonnett@…, 13 years ago

Easy pickings: set

Replying to joshua.bonnett@…:

It would be very very useful for 3rd party libs(blogs, cms's, stores) to be able to use this to provide their own boiler plate.

not sure how I unset easy pickings.

comment:8 by anonymous, 13 years ago

Easy pickings: unset
UI/UX: unset

comment:9 by Aymeric Augustin, 12 years ago

Resolution: fixed
Status: newclosed

Since we introduced support for custom project templates a few weeks ago, this ticket can be considered fixed.

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