Opened 12 years ago

Closed 12 years ago

#19125 closed Cleanup/optimization (fixed)

django-admin.py startproject attemps a relative import

Reported by: Łukasz Rekucki 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 Łukasz Rekucki 12 years ago.

Download all attachments as: .zip

Change History (6)

by Łukasz Rekucki, 12 years ago

Attachment: ticket19125.diff added

comment:2 by Łukasz Rekucki, 12 years ago

Has patch: set

comment:3 by Claude Paroz, 12 years ago

Component: UncategorizedCore (Management commands)
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

comment:4 by Ramiro Morales, 12 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

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