add a to_dict() for States, and then I can use a 1-liner to set a var in jscript
This commit is contained in:
@@ -85,9 +85,13 @@ class States(PA):
|
|||||||
self.default_folder_noo=u.default_storage_noo
|
self.default_folder_noo=u.default_storage_noo
|
||||||
self.default_search_noo=u.default_search_noo
|
self.default_search_noo=u.default_search_noo
|
||||||
self.cwd=self.root
|
self.cwd=self.root
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def to_dict(self):
|
||||||
|
# Automatically include all instance attributes
|
||||||
|
return {key: value for key, value in vars(self).items()}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# /states -> GET only -> prints out list of all prefs (simple for now)
|
# /states -> GET only -> prints out list of all prefs (simple for now)
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user