Changeset 9afa277a790ecf956a0d9ad57f8dd932e8b65b80


Ignore:
Timestamp:
15.05.2013 21:49:28 (8 years ago)
Author:
Stanislaw Klekot <dozzie@…>
Branches:
b66903eafbcb1d49112014abc82c8bf683413db0
Children:
b3ebaf750cf3d8cffbd719d59459408dafc3a49c
Parents:
e0be4e0ba9e74bbae56efe2db89d24b014e91faf
git-author:
Stanislaw Klekot <dozzie@…> (15.05.2013 21:49:28)
git-committer:
Stanislaw Klekot <dozzie@…> (15.05.2013 21:49:28)
Message:

#28 Added stub for executing a macro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dashwiki/wiki/models.py

    r701f16 r9afa27  
    6767  protocol    = models.ForeignKey(MacroProtocol) 
    6868 
     69  # args is a hash with pairs (param_name => param_value) 
     70  def call(self, args): 
     71    # FIXME: do actual macro call using communication plugins 
     72    import json 
     73    return "<this is a stub for macro %s called with args %s>" % ( 
     74      self.name, 
     75      json.dumps({ 
     76        'definition': { 
     77          'url':      url, 
     78          'out_args': out_args, 
     79          'protocol': protocol,    
     80        }, 
     81        'call': args, 
     82      }) 
     83    ) 
     84 
    6985  def __unicode__(self): 
    7086    return self.name 
Note: See TracChangeset for help on using the changeset viewer.