Templates with startproject or startapp do not render project_directory or app_directory correctly
|Reported by:||gw.2012@…||Owned by:||jezdez|
|Component:||Core (Management commands)||Version:||master|
|Severity:||Release blocker||Keywords:||startproject startapp templates|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The documentation at https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-startproject states that template files may contain the tag project_directory that should contain the full path of the newly created project. Similarly with startapp and app_directory.
This is not exactly true in case you are specifying the destination directory yourself. The project_directory variable gets exactly the value specified as the parameter and in case of relative paths (or even ".") it is not *a full path* of the newly created project.
Either the documentation should be changed (although the behavour is then inconsistent) or a full path resolving functionality implemented. Maybe it could also be implemented as a full path relative to a virtualenv or other environment it is contained in.
Change History (4)
comment:1 Changed 4 years ago by ptone
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to ptone
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Version changed from 1.4-beta-1 to SVN
comment:3 Changed 4 years ago by jezdez
- Owner changed from ptone to jezdez
- Severity changed from Normal to Release blocker