schoolgrades – School Grades Components Module¶
Components representing and aggregating school grades.
-
waeup.kofa.schoolgrades.
DEFAULT_VALUE
= <object object>¶ A unique default value.
-
class
waeup.kofa.schoolgrades.
ResultEntry
(subject=None, grade=None)[source]¶ Bases:
grokcore.content.components.Model
A result entry contains a subject and a grade.
-
__doc__
= 'A result entry contains a subject and a grade.\n '¶
-
__implemented__
= <implementedBy waeup.kofa.schoolgrades.ResultEntry>¶
-
__module__
= 'waeup.kofa.schoolgrades'¶
-
__ne__
(other)[source]¶ Two ResultEntries are not equal, if their equality test fails.
a != b <-> not(a == b). Python doc tell, that __ne__ should also be rovided, whenever __eq__ is implemented.
-
__provides__
¶ Special descriptor for class __provides__
The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.
For example:
>>> from zope.interface import Interface >>> class IFooFactory(Interface): ... pass >>> class IFoo(Interface): ... pass >>> class C(object): ... implements(IFoo) ... classProvides(IFooFactory) >>> [i.getName() for i in C.__provides__] ['IFooFactory']
>>> [i.getName() for i in C().__provides__] ['IFoo']
-
classmethod
from_string
(string)[source]¶ Create new ResultEntry instance based on string.
The string is expected to be in format as delivered by meth:to_string.
This is a classmethod. This means, you normally will call:
ResultEntry.from_string(mystring)
i.e. use the ResultEntry class, not an instance thereof.
-
grade
¶ Computed attributes based on schema fields
Field properties provide default values, data validation and error messages based on data found in field meta-data.
Note that FieldProperties cannot be used with slots. They can only be used for attributes stored in instance dictionaries.
-
subject
¶ Computed attributes based on schema fields
Field properties provide default values, data validation and error messages based on data found in field meta-data.
Note that FieldProperties cannot be used with slots. They can only be used for attributes stored in instance dictionaries.
-
-
class
waeup.kofa.schoolgrades.
ResultEntryField
(**kw)[source]¶ Bases:
zope.schema._field.Object
A zope.schema-like field for usage in interfaces.
If you want to define an interface containing result entries, you can do so like this:
class IMyInterface(Interface): my_result_entry = ResultEntryField()
Default widgets are registered to render result entry fields.
-
__doc__
= 'A zope.schema-like field for usage in interfaces.\n\n If you want to define an interface containing result entries, you\n can do so like this::\n\n class IMyInterface(Interface):\n my_result_entry = ResultEntryField()\n\n Default widgets are registered to render result entry fields.\n '¶
-
__implemented__
= <implementedBy waeup.kofa.schoolgrades.ResultEntryField>¶
-
__module__
= 'waeup.kofa.schoolgrades'¶
-
__provides__
¶ Special descriptor for class __provides__
The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.
For example:
>>> from zope.interface import Interface >>> class IFooFactory(Interface): ... pass >>> class IFoo(Interface): ... pass >>> class C(object): ... implements(IFoo) ... classProvides(IFooFactory) >>> [i.getName() for i in C.__provides__] ['IFooFactory']
>>> [i.getName() for i in C().__provides__] ['IFoo']
-