wuttafarm.install¶
Install handler for WuttaFarm
- class wuttafarm.install.WuttaFarmInstallHandler(config, **kwargs)[source]¶
Custom install handler for WuttaFarm
- bootstrap_core_data(session)[source]¶
Create some “core” data records so the app functions correctly.
- enhance_admin_user(user, site_admin)[source]¶
Enhance the first admin user by assigning it also to each of the “farm” roles.
- establish_builtin_roles(session)[source]¶
Establish all “built-in” roles for the app.
Default logic creates the following roles and attaches a basic “help text” note for each:
Administrator
Authenticated
Anyone
- Parameters:
session – Current db session.
- prompt_user_for_context()[source]¶
This is responsible for initial user prompts.
This happens early in the install, so this method can verify the info, e.g. test the DB connection, but should not write any files as the app dir may not exist yet.
Default logic calls
get_db_url()for the DB connection, then may ask about Wutta-Continuum data versioning. (The latter is skipped if the package is missing.)Subclass should override this method if they need different prompting logic. The return value should always include at least these 2 items:
db_url- URL for the DB connectionwants_continuum- whether data versioning should be enabled
- Returns:
Dict of template context