#33890: call_command('startproject', 'project_name', '.') raises CommandError
'project_name'
-------------------------------------+-------------------------------------
Reporter: piscvau | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 4.0
commands) |
Severity: Normal | Resolution: invalid
Keywords: call_command raises | Triage Stage:
exception | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by piscvau):
I do not shout I am just trying to raise a point which is the following :
if the current directory is <project-name> and you type in django-admin
startproject project-name . you create a project project-name in the
current directory project-name. This is the django docs recommended method
to create a project in the current directory.
The django docs also says : To call a management command from code, use
call_command.
and yet :
management.call_command (startproject, Path.cwd().stem, '.') raises an
exception.
The reason why the exception is raised is very straight forward.
But if you need to create a custom startproject command and create the
project in the current directory, applying the documentation leads you
immediately to this exception.
So if it is not a bug, it is at least a functional problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/33890#comment:4>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018267e42460-a867cfc7-b557-4328-9df7-1e00c589f288-000000%40eu-central-1.amazonses.com.