adhocracy_core.sheets.badge module¶
Badge sheet.
-
interface
IBadge[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for badge data sheet.
-
interface
IHasBadgesPool[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for resources that have a badge datas pool.
-
interface
ICanBadge[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for principals that can assign badges.
-
interface
IBadgeable[source]¶ Extends:
adhocracy_core.interfaces.ISheetMarker interface for resources that can be badged.
-
interface
IBadgeAssignment[source]¶ Extends:
adhocracy_core.interfaces.ISheet,adhocracy_core.interfaces.ISheetReferenceAutoUpdateMarkerMarker interface for the badge assignment sheet.
-
interface
BadgeReference[source]¶ Extends:
adhocracy_core.interfaces.SheetToSheetReference from badge to badge data resource.
-
interface
BadgeSubjectReference[source]¶ Extends:
adhocracy_core.interfaces.SheetToSheetReference from badge to assigning user.
-
interface
BadgeObjectReference[source]¶ Extends:
adhocracy_core.interfaces.SheetToSheetReference from badge to badged content.
-
interface
BadgeGroupReference[source]¶ Extends:
adhocracy_core.interfaces.SheetToSheetReference from badge to badge group.
-
class
BadgeSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaBadge sheet data structure.
-
class
HasBadgesPoolSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaData structure pointing to a badges post pool.
-
class
CanBadgeSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaCanBadge sheet data structure.
-
class
BadgeableSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaBadgeable sheet data structure.
- post_pool: Pool to post new
adhocracy_sample.resource.IBadgeAssignment.
-
create_unique_badge_assignment_validator(badge_ref: adhocracy_core.schema.Reference, object_ref: adhocracy_core.schema.Reference, kw: dict) → <built-in function callable>[source]¶ Create validator to check that a badge assignment is unique.
Badge assignments is considered unique if there is at most one for each badge in post_pool.
Parameters: - badge – Reference to a sheet with post_pool field.
- kw (
dict) – dictionary with keys context and registry.
-
class
BadgeAssignmentSchema(*arg, **kw)[source]¶ Bases:
adhocracy_core.schema.MappingSchemaBadge sheet data structure.