#21521: Provide a boiler plate free ./manage.py startapp command
------------------------------+--------------------------------------
     Reporter:  anonymous     |                    Owner:  nobody
         Type:  New feature   |                   Status:  closed
    Component:  Core (Other)  |                  Version:  1.6
     Severity:  Normal        |               Resolution:  wontfix
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  1             |                    UI/UX:  1
------------------------------+--------------------------------------
Changes (by russellm):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I'm not sure I see the value here.

 Firstly, there's a problem with failure modes. It's easy to say "just add
 X to INSTALLED_APPS, and Y to urls.py", but even in your explanation
 you've referred to "simple" urls.py files. What's a "simple" file? How do
 you identify it reliably? And how will the app behave when it doesn't find
 a "simple" file? The worst outcome here would be a command that
 "automagically" completely breaks your settings/urls file, and this sort
 of breakage would be easy to do accidentally when rewriting files. So, you
 would have to be ultraconservative, which means you'll fall back to just
 printing the instructions most of the time.

 Secondly, there's the argument that we shouldn't be hiding details with
 magic commands. I'd almost argue that startapp should be deprecated.
 Speaking personally, I can't remember the last time that I used it. We
 shouldn't be masking the internals of django apps by making them seem
 mystical. An app is just a Python module that contains a models.py file
 (although even that restriction could be lifted). If you want an urls.py
 file, you can write one -- but it doesn't even need to be called urls.py.
 You want views? Put them in a file as well -- ideally, one called
 views.py. Bootstrapping commands hide this base philosophy, and
 sophisticated bootstrapping commands make it even harder to spot. I'd
 rather remove the crutch, rather than make the crutch more powerful.

 Marking wontfix; if you want to argue your case, please start a discussion
 on django-dev.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.7fd3d2274581fd84ac379471c7c03ee0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to