Code

Opened 3 years ago

Closed 3 years ago

#15090 closed (wontfix)

manage.py startapp should read default apps directory from settings.py

Reported by: italomaia Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Well, i was thinking, is very commom to define a especial package where all your install apps go so, if one could configure that folder in settings, startapp could create apps directly in that folder, like, apps/.

Proposed syntax:

APPS_DIR = "." # default $0

APPS_DIR = "/apps/" # usage $1

So, if $1 then:
python manage.py startapp blog would create "blog" in apps/blog/

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by russellm

  • milestone 1.3 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

The concept of having a single, canonical "app" directory seems like a massive simplification of the set of likely development environments.

It ignores the case of having multiple app directories -- which, I would argue, is just as likely as the single directory case.

It also ignores the fact that the location of an "app" directory is system specific. The location of *my* app directory isn't necessarily the same as the location you *your* app directory. That makes the app directory a system configuration issue, not a project configuration issue. *If* we were to do this, an environment variable -- an analog to DJANGO_SETTINGS_MODULE or PYTHONPATH -- would seem like a better way to handle the problem.

However, ultimately, I just don't see this as being enough of a problem that the solution is worth the effort to implement and maintain. startapp creates an app in the current directory. It isn't that hard to use 'cd' before you call it if the current directory isn't a convenient location. And that's only *if* you use startapp at all - I can't remember the last time I even used startapp in practice.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.