November 2015
Beginner to intermediate
840 pages
26h 30m
English
createtag Management CommandThe goal is to create a simple management command that will create a new Tag object, as shown in Example 24.18.
Example 24.18: Shell Code
$ ./manage.py createtag "django unleashed"
Commands are stored in the commands package of the management package of apps, as shown in Example 24.19.
Example 24.19: Shell Code
$ mkdir -p organizer/management/commands
$ touch organizer/management/--init--.py
$ touch organizer/management/commands/--init--.py
$ touch organizer/management/commands/createtag.py
$ tree organizer/management/
organizer/management/
![]()
Read now
Unlock full access