class FinanceSchema(MappingSchema): """Data structure for financial aspects.""" budget = CurrencyAmount(missing=required) requested_funding = CurrencyAmount(missing=required, validator=Range(min=0, max=50000)) other_sources = SingleLine() granted = Boolean()
class ProposalSchema(colander.MappingSchema): """Data structure for the Burgerhaushalt information.""" budget = CurrencyAmount(missing=colander.drop, default=None, validator=colander.Range(min=0)) location_text = SingleLine(validator=colander.Length(max=100))
class ProposalSchema(MappingSchema): """Data structure for organizational information.""" # TODO: check exact length restrictions budget = CurrencyAmount(missing=required, validator=Range(min=0, max=50000)) creator_participate = Boolean() location_text = SingleLine(validator=Length(max=100))
def inst(self): from adhocracy_core.schema import CurrencyAmount return CurrencyAmount()
class FinancialPlanningSchema(MappingSchema): budget = CurrencyAmount(missing=required) requested_funding = CurrencyAmount(missing=required, validator=Range(min=1, max=50000)) major_expenses = Text(missing=required)