Opened 17 years ago

Closed 17 years ago

Last modified 13 years ago

#3999 closed (wontfix)

django-admin.py template dir argument

Reported by: stuff4ash@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It could be useful to be able to specify alternative project/app template directories (instead of django/conf/app_template & django/conf/project_template).
Developers could have custom template dirs taylored to their needs.

Change History (7)

comment:1 by Chris Beaven, 17 years ago

Resolution: wontfix
Status: newclosed

Use a separate settings files for this.

comment:2 by stuff4ash@…, 17 years ago

Resolution: wontfix
Status: closedreopened

what settings file? when creating a project (as in running django-admin startproject) what settings file can you specifiy?
when i create a new project, i get a a folder with the project name, with subfiles settings.py, init.py, urls.py, and manage.py. namely, the files that are under django/conf/project_template. i would like to specify an alternative project_template folder, it automatically creates whatever i have under it, (for example, a substructure i sometimes work with):

apps init.py media
config README tools
contrib manage.py settings.py urls.py
docs templates

as far as i know, this has nothing to do with settings option. i might be wrong though ;)

comment:3 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed

Oh, ok. I was under the impression you were talking about the TEMPLATE_DIR setting (too much skim-reading, sorry).

startapp and startproject are just shortcuts - IMO we don't need a setting to override this, but I'll pass it by someone else to decide.

comment:4 by Malcolm Tredinnick, 17 years ago

Resolution: wontfix
Status: reopenedclosed

I agree with Chris. There's a limit to how much customisation it's worth having here. You can easily copy whichever files or directories you want by hand or script if you are up to the level of needing to customise them.

comment:5 by George Song, 15 years ago

Or just write a custom command to plug into manage.py.

in reply to:  5 comment:6 by pbaker@…, 13 years ago

Bump.

This is a bit old, but came across it in development of Django dependent project, RapidSMS. This inflexibility has caused (poor) duplication of code (see 1 and 2 and 3).

As Django has grown and become used by more projects, it might make sense to tackle this. @gsong, a custom command in manage.py doesn't fix the hard-coded path in django.core.management.base.copy_helper. Instead of making an additional setting, how about passing an additional variable to the copy_helper? I'd be happy to submit a patch!

comment:7 by Chris Beaven, 13 years ago

A better place to talk about closed tickets is the mailing list.

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