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

30 views
Skip to first unread message

Django

unread,
Jul 30, 2025, 7:20:22 PM7/30/25
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 AM7/31/25
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 PM7/31/25
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 AM8/6/25
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 AM8/7/25
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 AM8/12/25
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>

Django

unread,
Jan 22, 2026, 9:29:24 AMJan 22
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 Abhimanyu Singh Negi):

Hi,

I’d like to work on this ticket if it’s still available. I’ve reproduced
the issue on Django 5.2 and confirmed that `django-admin startapp` works
as documented, while `manage.py startapp` fails due to a module conflict
check being applied to the destination directory.

My plan is to align `manage.py startapp` with `django-admin` by ensuring
the conflict check applies to the app name, not the destination path, and
to add a regression test for both cases.

If that approach sounds reasonable and the ticket isn’t already being
actively worked on, I’d be happy to take it.

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

Django

unread,
Aug 9, 2026, 7:56:16 PM (12 hours ago) Aug 9
to django-...@googlegroups.com
#36533: manage.py startapp <name> <directory> fails to create new app
-------------------------------------+-------------------------------------
Reporter: Kenneth Love | Owner: Django
| Sprints
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 Tim Schilling):

* owner: jefferies917 => Django Sprints

Comment:

Assigning to Django Sprints for to reserve for an upcoming sprint.
DjangoCon US ends August 28, this is available for someone else to pick up
on the 29th.

jefferies917, if you'd like to continue to work on this please re-assign
this to yourself.
--
Ticket URL: <https://code.djangoproject.com/ticket/36533#comment:7>
Reply all
Reply to author
Forward
0 new messages