Opened 2 years ago

Closed 2 years ago

#19125 closed Cleanup/optimization (fixed)

django-admin.py startproject attemps a relative import

Reported by: lrekucki Owned by: nobody
Component: Core (Management commands) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

By mistake, I passed a path instead of a name:

$ PYTHONPATH=. ./django/bin/django-admin.py startproject ../foobar
TypeError: relative imports require the 'package' argument

The error message isn't very obvious.

Attachments (1)

ticket19125.diff (5.1 KB) - added by lrekucki 2 years ago.

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by lrekucki

comment:2 Changed 2 years ago by lrekucki

  • Has patch set

comment:3 Changed 2 years ago by claudep

  • Component changed from Uncategorized to Core (Management commands)
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Bug to Cleanup/optimization

comment:4 Changed 2 years ago by ramiro

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 2 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 9893fa12b735f3f47b35d4063d86dddf3145cb25:

Fixed #19125 -- The startproject command should validate the name earlier

Thanks Łukasz Rekucki for the report and the patch.

Note: See TracTickets for help on using tickets.
Back to Top