Module s.d.admin

Part of stoqlib.database

Administration

Helper functions related to administration of the database, creating tables, removing tables and configuring administration user.

Function ensure_admin_user Undocumented
Function create_main_branch Creates a new branch and sets it as the main branch for the system
Function _register_payment_methods Registers the payment methods and creates persistent
Function _ensure_card_providers Creates a list of default card providers
Function get_admin_user Retrieves the current administrator user for the system
Function ensure_sellable_constants Create native sellable constants.
Function user_has_usesuper This method checks if the currently logged in postgres user has
Function _create_procedural_languages Creates procedural SQL languages we're going to use in scripts
Function _get_latest_schema Undocumented
Function create_base_schema Undocumented
Function create_default_profiles Undocumented
Function _install_invoice_templates Undocumented
Function initialize_system Call all the necessary methods to startup Stoq applications for
def ensure_admin_user(administrator_password):
Undocumented
def create_main_branch(trans, name):
Creates a new branch and sets it as the main branch for the system
Parameterstransa database transaction
namename of the new branch
def _register_payment_methods():
Registers the payment methods and creates persistent domain classes associated with them.
def _ensure_card_providers():
Creates a list of default card providers
def get_admin_user(conn):
Retrieves the current administrator user for the system
Parametersconna database connection
Returnsthe admin user for the system
def ensure_sellable_constants():
Create native sellable constants.
def user_has_usesuper(trans):
This method checks if the currently logged in postgres user has `usesuper' access which is necessary for certain operations
Parameterstransa database connection
Returnsif the user has `usesuper' access
def _create_procedural_languages():
Creates procedural SQL languages we're going to use in scripts
def _get_latest_schema():
Undocumented
def create_base_schema():
Undocumented
def create_default_profiles():
Undocumented
def _install_invoice_templates():
Undocumented
def initialize_system():
Call all the necessary methods to startup Stoq applications for every purpose: production usage, testing or demonstration
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.