Package posterity :: Package admin :: Module init :: Class InitCommand

Class InitCommand



        object --+    
                 |    
admin.AdminCommand --+
                     |
                    InitCommand

The "init" admin command

This admin command creates and initializes a new Posterity instance directory.



Instance Methods
 
setup_optparser(self)
Configure the OptionParser
 
finalize_options(self)
Decide in the final value for all options and arguments
 
run_command(self, argv)

Inherited from admin.AdminCommand: __init__, run

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  cmd_name = 'init'
  short_help = 'Initialize posterity instance'
  usage = '%prog init [options]'

Inherited from admin.AdminCommand: run_in_transaction

Properties

Inherited from object: __class__

Method Details

setup_optparser(self)

 

Configure the OptionParser

Commands that want to accept additional command line options need to define them using The "self.parser.add_option(...)" method. This method will be called before the command line is parsed

Overrides: admin.AdminCommand.setup_optparser
(inherited documentation)

finalize_options(self)

 

Decide in the final value for all options and arguments

This methiod is called after the command line has been parsed and the resulting options and arguments are stored in self.options and self.args.

If a valid database connection string is stored in self.db_url the following self.run()-call will be wrapped inside a database transaction.

Overrides: admin.AdminCommand.finalize_options
(inherited documentation)

run_command(self, argv)

 
Overrides: admin.AdminCommand.run_command