Esempio n. 1
0
 def __init__(self, id, **kwargs):
     """Create a new proposal instance. This MUST have an ID
     to be valid; we do not create new proposals from nowhere
     for our purposes.
     """
     kwargs['id'] = int(id)
     kwargs['thunderdome_votes'] = None
     kwargs['decided'] = False
     self.__dict__.update({
         'api': API(),
         'data': kwargs,
     })
Esempio n. 2
0
    def __init__(self, code, talks=(), **kwargs):
        """Create a new thunderdome group instance. This MUST have a code
        to be valid; we do not create new groups or proposals from nowhere
        for our purposes.
        """
        # Iterate over the talks and make Proposal objects from each.
        talks_ = []
        for t in talks:
            talks_.append(Proposal(**t))
        kwargs['talks'] = talks_

        # Set the code.
        kwargs['code'] = code

        # Set an empty decision object.
        kwargs['decision'] = {}

        # Write the things to the object.
        self.__dict__.update({
            'api': API(),
            'data': kwargs,
        })
Esempio n. 3
0
 def __init__(self):
     self.api = API()