Ejemplo n.º 1
0
 def display(self, value, **kwargs):
     """Display the form with default values from the engine param."""
     engine = kwargs['engine']
     data = engine._data
     defaults = {'aws': {
         'aws_access_key': data.get('aws_access_key', ''),
         'aws_secret_key': data.get('aws_secret_key', ''),
         's3_bucket_name': data.get('s3_bucket_name', ''),
         's3_bucket_dir': data.get('s3_bucket_dir', ''),
         'cf_download_domain': data.get('cf_download_domain', ''),
         'cf_streaming_domain': data.get('cf_streaming_domain', ''),
     }}
     value = merge_dicts({}, defaults, value)
     return StorageForm.display(self, value, **kwargs)
Ejemplo n.º 2
0
 def display(self, value, player, **kwargs):
     newvalue = {}
     defaults = {"options": player.data}
     merge_dicts(newvalue, defaults, value)
     return PlayerPrefsForm.display(self, newvalue, player, **kwargs)
Ejemplo n.º 3
0
 def display(self, value, player, **kwargs):
     newvalue = {}
     defaults = {'options': player.data}
     merge_dicts(newvalue, defaults, value)
     return PlayerPrefsForm.display(self, newvalue, player, **kwargs)