Code

Opened 6 years ago

Closed 4 years ago

Last modified 3 years ago

#9170 closed (fixed)

Write real documentation for custom management commands

Reported by: ubernostrum Owned by: davidfischer
Component: Documentation Version: master
Severity: Keywords:
Cc: djfische@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The current documentation doesn't really provide any useful information.

A good starting point would be to give docstrings to the classes and functions in django/core/management/base.py.

Attachments (2)

9170_manage_command.diff (4.1 KB) - added by ericholscher 5 years ago.
Super basic example and simple reference
management-commands-9170.diff (9.7 KB) - added by davidfischer 4 years ago.
Added a complete tutorial of adding a management command

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by ubernostrum

(In [9082]) Add some docstrings to the base classes for management commands. Refs #9170.

comment:2 Changed 6 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Might do a screencast on this as well. But real documentation is your friend as well.

comment:3 Changed 5 years ago by ericholscher

  • Triage Stage changed from Unreviewed to Accepted

This is true. Two devs have blog posts on the topic, perhaps we should Sphinxify them and add them to the docs?

http://oebfare.com/blog/2008/nov/03/writing-custom-management-command/
http://www.b-list.org/weblog/2008/nov/14/management-commands/

Changed 5 years ago by ericholscher

Super basic example and simple reference

comment:4 Changed 5 years ago by ericholscher

Uploaded some basic docs that have a simple example and mention the different kinds of management commands. Not a lot, but this really needs some better docs!

Changed 4 years ago by davidfischer

Added a complete tutorial of adding a management command

comment:5 Changed 4 years ago by davidfischer

  • Cc djfische@… added
  • Has patch set
  • Owner changed from nobody to davidfischer
  • Status changed from new to assigned
  • Version changed from 1.0 to SVN

comment:6 Changed 4 years ago by ericholscher

  • milestone set to 1.2

Applied this to trunk and it looks and works well. There is a mixing of reference material here with a turorial, so we might want to split that out into a seperate page, but it seems small enough that keeping it together also makes sense.

I think this should go into 1.2 though, because this has been an oddly undocumented part of Django for a while.

comment:7 Changed 4 years ago by brosner

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

(In [13138]) Fixed #9170 -- added improved custom management command documentation.

Thanks to David Fischer and Eric Holscher for their work on initial patches.

comment:8 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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.