sites module¶
-
class
sites.Sites(db_path_name)¶ Bases:
dbparam.DbParamSites worker to operate DB on table sites (list, add, modify and delete methods).
Site name has to be alphanumeric and less than 20 characters. At the DB all the spaces
" "will be replaced by underscores"_".-
static
_check_value(value)¶ Verifies the value to be alphanumeric string, and less than 20 characters.
Parameters: value – string to verify Returns: Trueif the value is a valid string otherwise returnsFalse
-
add()¶ Add a site.
Returns: Sitename added orFalseif the parent Customer do not exists, or the site already exists.
-
delete()¶ Delete a site.
Returns: Sitename deleted orFalseif the site do not exists.
-
list()¶ List the table
sitesordered alphabetically, and filtered by customer if that option was selected.Returns: Trueif the site was listed orFalseif the customer do not exists.
-
modify()¶ Modify a site.
Returns: Siteoriginal name andnew_namename, orFalseif there is with parent Customer or site
-
static