Opened 5 weeks ago
Last modified 3 weeks ago
#36533 assigned Bug
manage.py startapp <name> <directory> fails to create new app
Reported by: | Kenneth Love | Owned by: | jefferies917 |
---|---|---|---|
Component: | Core (Management commands) | Version: | 5.2 |
Severity: | Normal | Keywords: | startapp |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Current 5.2 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
intoexample_project
- Create a new destination directory with
mkdir destination
- Create a new app in the
destination
directory withuv 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.
Change History (5)
comment:1 by , 5 weeks ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 5 weeks ago
comment:3 by , 4 weeks ago
Has patch: | set |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:4 by , 4 weeks ago
Patch needs improvement: | set |
---|
comment:5 by , 3 weeks ago
I think this is the expected behaviour, since you already created the directory destination
so you must remove the directory destination
before running the startapp command.
Note:
See TracTickets
for help on using tickets.
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