Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
("w", "week"), ("m", "month"), ("s", "semester"), ("y", "year"), ("o", "one_shot"), )
""" Abstract model for scholarships """
max_length=1, choices=SCHOLARSHIP_FREQUENCIES, default="m", null=True, blank=True, )
null=True, max_digits=20, decimal_places=2, validators=[MinValueValidator(0)] )
null=True, max_digits=20, decimal_places=2, validators=[MinValueValidator(0)] )
""" Serializer for the scholarship class """
""" Custom attribute validation """
raise serializers.ValidationError( "A currency must be specified when there is a value" ) attrs["amount_max"] is not None and attrs["amount_max"] < attrs["amount_min"] ): "amount_max should be greater or equal than amount_min" )
"short_description", "currency", "other_advantages", "frequency", "amount_min", "amount_max", )
|