[Django] #36533: manage.py startapp <name> <directory> fails to create new app

8 views
Skip to first unread message

Django

unread,
Jul 30, 2025, 7:20:22 PMJul 30
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Type: Bug
Status: new | Component: Core
| (Management commands)
Version: 5.2 | Severity: Normal
Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Current 5.2 [https://docs.djangoproject.com/en/5.2/ref/django-
admin/#startapp documentation] says that `manage.py startapp name
destination` should create a new app in the `destination` directory. This
_does_ work with `django-admin` but fails with `manage.py`.

== Steps to reproduce

* Create a new virtual environment with `uv venv`
* Install Django with `uv pip install django`
* Create a new Django project with `uv run django-admin startproject
example_project`
* `cd` into `example_project`
* Create a new destination directory with `mkdir destination`
* Create a new app in the `destination` directory with `uv run manage.py
startapp example destination`
* Get the error: `CommandError: 'destination' conflicts with the name of
an existing Python module and cannot be used as an app directory. Please
try another directory.`

== Expectation

A new Django app named `example` would be created in the `destination`
directory.
--
Ticket URL: <https://code.djangoproject.com/ticket/36533>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 31, 2025, 3:24:50 AMJul 31
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner: (none)
Type: Bug | Status: new
Component: Core (Management | Version: 5.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:1>

Django

unread,
Jul 31, 2025, 12:11:21 PMJul 31
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner: (none)
Type: Bug | Status: new
Component: Core (Management | Version: 5.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mridul):

Hi everyone,
I am a new contributor to Django. I have recently resolved an easy
pickings bug ticket and am looking for my next ticket to work on. I came
across this ticket and it seems like an interesting issue to work on.
Before beginning, I wanted to check whether this would be a suitable task
for someone at my stage. I am still getting familiar with the codebase,
but I am willing to put in the time to understand the issue thoroughly and
work through and involved complexity.

Would this be a good ticket for me to work on, or would you recommend
looking for something else?
Thanks in advance for the guidance
--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:2>

Django

unread,
Aug 6, 2025, 11:04:23 AMAug 6
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner:
| jefferies917
Type: Bug | Status: assigned
Component: Core (Management | Version: 5.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jefferies917):

* has_patch: 0 => 1
* owner: (none) => jefferies917
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:3>

Django

unread,
Aug 7, 2025, 4:17:15 AMAug 7
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner:
| jefferies917
Type: Bug | Status: assigned
Component: Core (Management | Version: 5.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:4>

Django

unread,
Aug 12, 2025, 12:22:33 AMAug 12
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner:
| jefferies917
Type: Bug | Status: assigned
Component: Core (Management | Version: 5.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by suhail vs):

I think this is the expected behaviour, since he already created the
directory `destination`
so you must remove the directory `destination` before running the startapp
command.
--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:5>
Reply all
Reply to author
Forward
0 new messages