예제 #1
0
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()
예제 #2
0
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))
예제 #3
0
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))
예제 #4
0
 def inst(self):
     from adhocracy_core.schema import CurrencyAmount
     return CurrencyAmount()
예제 #5
0
class FinancialPlanningSchema(MappingSchema):
    budget = CurrencyAmount(missing=required)
    requested_funding = CurrencyAmount(missing=required,
                                       validator=Range(min=1, max=50000))
    major_expenses = Text(missing=required)