def fields(self, fields): fields.field_name = IntegerField()
def fields(self, fields): fields.field_name = IntegerField(default=3)
def events(self, events): events.an_event = Event(label='click me', event_argument1=IntegerField(), event_argument2=IntegerField())
def fields(self, fields): fields.row = IntegerField(label='Row', required=True, default=self.row) fields.alpha = Field(label='Alpha', required=True, default=self.alpha)
class InheritingModelObject(ModelObject): fields = ReahlFields() fields.field3 = IntegerField()
def events(self, events): events.an_event = Event(an_argument=IntegerField())
def fields(self, fields): fields.field1 = IntegerField() fields.field2 = BooleanField()
class ModelObject(object): fields = ReahlFields() fields.field1 = IntegerField() fields.field2 = BooleanField()
def query_fields(self, fields): fields.selected = IntegerField(required=False, default=1)
def fields(self, fields): fields.sort_column_number = IntegerField( required=False, default=self.sort_column_number) fields.sort_descending = BooleanField(required=False, default=self.sort_descending)
def query_fields(self, fields): fields.fancy_state = IntegerField(required=False, default=1)
def single_value(self): self.field = IntegerField(required=False, default=1, label='field') self.field_on_query_string = '{field_name}=123' self.field_value_marshalled = 123 self.field_value_as_string = '123'
def query_fields(self, fields): fields.refreshing_state = IntegerField(required=False, default=1) fields.non_refreshing_state = IntegerField(required=False, default=2)
def fields(self, fields): collaborators = [Choice(i.id, IntegerField(label=i.email)) for i in Session.query(EmailAndPasswordSystemAccount).all()] fields.chosen_collaborator = ChoiceField(collaborators, label='Choose collaborator') fields.may_edit_address = BooleanField(label='May edit existing addresses') fields.may_add_address = BooleanField(label='May add new addresses')
def fields(self, fields): fields.choice = ChoiceField([ Choice(1, IntegerField(label='Hide chart')), Choice(2, IntegerField(label='Show chart')) ], label='Choice')