#18296: Make creating apps inside project folder more intuitive with manage.py
startapp command
--------------------------------------------+------------------------------
     Reporter:  lgp171188@…                 |      Owner:  nobody
         Type:  Cleanup/optimization        |     Status:  new
    Component:  Core (Management commands)  |    Version:  1.4
     Severity:  Normal                      |   Keywords:  manage.py,
 Triage Stage:  Unreviewed                  |  startapp
Easy pickings:  1                           |  Has patch:  0
                                            |      UI/UX:  0
--------------------------------------------+------------------------------
 The structure of the project created by 'django-admin.py startproject' has
 changed from Django 1.4. The 'manage.py' file is at the same level where
 the project folder containing settings.py, urls.py is present. In order to
 create an app within the project as was possible with Django < 1.4, the
 command to be used is 'python manage.py startapp <app name> <destination
 folder which is optional>. So if I execute the command "python manage.py
 startapp myapp myproject", there is an error that says "Error: <full
 path>/<project name>/<project name>/__init__.py already exists, overlaying
 a project or app into an existing directory won't replace conflicting
 files". The command actually expects an empty directory having the name of
 the app inside the project directory to work correctly. So the user has to
 create that directory and then create the app. This isn't very intuitive
 and django should create the app directory if it doesn't exist and then
 create the app to show the same behaviour as the previous versions.

 One other way to work around this behaviour is to change to the project
 directory and then execute python ../manage.py startapp appname.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18296>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to