Opened 4 months ago
Last modified 3 months 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 cdintoexample_project- Create a new destination directory with
mkdir destination - Create a new app in the
destinationdirectory 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 , 4 months ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 4 months ago
comment:3 by , 3 months ago
| Has patch: | set |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:4 by , 3 months ago
| Patch needs improvement: | set |
|---|
comment:5 by , 3 months ago
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.
Version 0, edited 3 months ago by (next)
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