ExperimentAdmin.member()#
- ExperimentAdmin.member(_member=None, *, of_section: str = '_content', admin: bool = False)[source]#
Decorator for adding pages and sections to the experiment.
Works both with and without arguments.
- Parameters
Examples
Adding a page directly to the main content section:
import alfred3 as al exp = al.Experiment() @exp.member class HelloWorld(al.Page): name = "hello_world" def on_exp_access(self): self += al.Text("This is a 'hello, world!' Page.")
Adding a page to a specific section:
import alfred3 as al exp = al.Experiment() exp += al.Section(name="main") @exp.member(of_section="main") class HelloWorld(al.Page): title = "Hello, World!" def on_exp_access(self): self += al.Text("This is a 'hello, world!' Page.")