ctreffe / alfred

Alfred - A library for rapid experiment development
MIT License
10 stars 1 forks source link

Add new page type NoDataPage #55

Closed ctreffe closed 4 years ago

ctreffe commented 4 years ago

We often create custom content with pages that are not supposed to store any data within the regular experiment dataset. In these cases, we create a NoDataPage class that delivers a dictionary only containing tag and uid when its data property is called:


@property
def data(self):
    # Pages must always return tag and uid!
    data = {'tag': self.tag, 'uid': self.uid}

    return data

We should add this as a standard class to Alfred's page.py