Code

Opened 3 years ago

Closed 3 years ago

#16167 closed New feature (wontfix)

support for custom django-admin commands written as packages

Reported by: Marwan Alsabbagh <marwan.alsabbagh@…> Owned by: nobody
Component: Core (Management commands) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django-admin commands currently only support implementation through python modules. It would be useful to support python packages as well. So as an example one could chose to implement a closepoll command in either of the below files:

polls/management/commands/closepoll.py
polls/management/commands/closepoll/__init__.py

This would be useful when a command contains a lot of logic or code and the developer would like the ability to split up the logic into multiple files to make the code base more manageable.

attached is a patch which implements these changes.

Attachments (1)

16167.package_commands.diff (785 bytes) - added by Marwan Alsabbagh <marwan.alsabbagh@…> 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by Marwan Alsabbagh <marwan.alsabbagh@…>

comment:1 Changed 3 years ago by Marwan Alsabbagh <marwan.alsabbagh@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by aaugustin

  • Needs documentation set
  • Needs tests set
  • Triage Stage changed from Unreviewed to Design decision needed

Discussion thread: https://groups.google.com/group/django-developers/browse_thread/thread/474f0f96293b06f3

There is a -0 / -1 by a core developer.

comment:3 Changed 3 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed
  • UI/UX unset

I'm going to close this ticket for the reasons explained by Carl in the discussion linked above.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.