Opened 7 months ago

Closed 9 days ago

#35515 closed New feature (fixed)

Auto-importing models feature for shell-command

Reported by: Salvo Polizzi Owned by: Salvo Polizzi
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: shell
Cc: Salvo Polizzi 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

This would be an update of the existing Django shell that auto-imports models for you from your app/project. Also, the goal would be to allow the user to subclass this shell to customize its behavior and import extra things.

Change History (26)

comment:1 by Salvo Polizzi, 7 months ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set

comment:2 by David Smith, 7 months ago

Triage Stage: UnreviewedAccepted

comment:3 by Adam Johnson, 7 months ago

Version: dev

comment:4 by Sarah Boyce <42296566+sarahboyce@…>, 7 months ago

In dfac15d5:

Fixed #35517, Refs #35515 -- Improved test coverage of shell command.

comment:5 by Bhuvnesh, 6 months ago

Has patch: unset
Needs tests: unset
Patch needs improvement: unset

comment:6 by Bhuvnesh, 6 months ago

Has patch: set

comment:7 by Bhuvnesh, 6 months ago

Needs documentation: unset

comment:8 by Sarah Boyce, 6 months ago

Patch needs improvement: set

comment:9 by Salvo Polizzi, 6 months ago

Patch needs improvement: unset

comment:10 by Sarah Boyce, 6 months ago

Patch needs improvement: set

comment:11 by Salvo Polizzi, 6 months ago

Patch needs improvement: unset

comment:12 by Sarah Boyce, 5 months ago

Patch needs improvement: set

comment:13 by Salvo Polizzi, 5 months ago

Patch needs improvement: unset

comment:14 by Sarah Boyce, 5 months ago

Discussion to decide on whether to have additional imports (and which ones): https://forum.djangoproject.com/t/default-automatic-imports-in-the-shell/33708

comment:15 by Sarah Boyce, 5 months ago

Patch needs improvement: set

Based off the discussion, it looks likely there will be additional imports added

comment:16 by Sarah Boyce, 5 months ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Agreed that the outcome of the discussion can be captured in a new ticket and worked on later

comment:17 by Sarah Boyce, 5 months ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:18 by Sarah Boyce, 5 months ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:19 by Sarah Boyce, 5 months ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Want to make sure we're happy with what gets printed to the console

comment:20 by Salvo Polizzi, 5 months ago

Patch needs improvement: unset

comment:21 by Sarah Boyce, 5 months ago

Triage Stage: AcceptedReady for checkin

comment:22 by Sarah Boyce, 3 months ago

Triage Stage: Ready for checkinAccepted

comment:23 by Natalia Bidart, 2 months ago

Related ticket about extra coverage for the shell command: #35517

comment:24 by Natalia Bidart, 5 weeks ago

Patch needs improvement: set

Updating ticket based on recent conversations in the forum.

comment:25 by Natalia Bidart, 10 days ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:26 by GitHub <noreply@…>, 9 days ago

Resolution: fixed
Status: assignedclosed

In fc28550:

Fixed #35515 -- Added automatic model imports to shell management command.

Thanks to Bhuvnesh Sharma and Adam Johnson for mentoring this Google
Summer of Code 2024 project. Thanks to Sarah Boyce, David Smith, Jacob
Walls and Natalia Bidart for reviews.

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