Package posterity :: Package admin :: Module initdb :: Class InitDBCommand

Class InitDBCommand



        object --+    
                 |    
admin.AdminCommand --+
                     |
                    InitDBCommand

The "initdb" admin command

This command prepares database by creating the tables used by the posterity data model.



Instance Methods
 
finalize_options(self)
Decide in the final value for all options and arguments
 
run(self)
Cary out the command's actions

Inherited from admin.AdminCommand: __init__, run_command, setup_optparser

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

Class Variables
  cmd_name = 'initdb'
  short_help = 'Initialize database'
  usage = '%prog initdb [options]'
Properties

Inherited from object: __class__

Method Details

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(self)

 

Cary out the command's actions

This method is invoked after the command line has been parsed. All AdminCommand subclasses need to implement this method.

Overrides: admin.AdminCommand.run
(inherited documentation)