Constants¶
To represent some fixed set of available options internally, we usually use enums internally. To store such data in the database, we represent it by integers.
However, at some places in our interface, these integers are actually presented to users without further processing. In particular, this is the case for the event export described in detail at Partieller Import as well as for some advanced facilities for moderators and admins.
To help interpret these values, we provide the following list.
cdedb.database.constants¶
Translation of numeric constants to semantic values.
This file takes care of encoding mostly enum-like things into the correct numeric values. The raw values should never be used, instead their symbolic names provided by this module should be used.
-
class
cdedb.database.constants.
AssemblyLogCodes
(value)¶ Available log messages core.log.
-
assembly_changed
= 2¶
-
assembly_concluded
= 3¶
-
assembly_created
= 1¶
-
assembly_deleted
= 4¶
-
assembly_presider_added
= 35¶
-
assembly_presider_removed
= 36¶
-
attachment_added
= 40¶
-
attachment_ballot_link_created
= 43¶
-
attachment_ballot_link_deleted
= 44¶
-
attachment_changed
= 42¶
-
attachment_removed
= 41¶
-
attachment_version_added
= 50¶
-
attachment_version_changed
= 52¶
-
attachment_version_removed
= 51¶
-
ballot_changed
= 11¶
-
ballot_created
= 10¶
-
ballot_deleted
= 12¶
-
ballot_extended
= 13¶
-
ballot_tallied
= 14¶
-
candidate_added
= 20¶
-
candidate_removed
= 22¶
-
candidate_updated
= 21¶
-
new_attendee
= 30¶
-
-
class
cdedb.database.constants.
AttachmentPolicy
(value)¶ Regulate allowed payloads for mails to lists.
This is currently only a tri-state, so we implement it as an enum.
-
allow
= 1¶
-
forbid
= 3¶
-
pdf_only
= 2¶ allow the mime-type application/pdf but nothing else
-
-
class
cdedb.database.constants.
CdeLogCodes
(value)¶ Available log messages cde.log.
-
class
cdedb.database.constants.
CoreLogCodes
(value)¶ Available log messages core.log.
-
genesis_approved
= 21¶
-
genesis_change
= 28¶
-
genesis_deleted
= 23¶
-
genesis_merged
= 25¶
-
genesis_rejected
= 22¶
-
genesis_request
= 20¶
-
genesis_verified
= 24¶
-
password_change
= 10¶
-
password_invalidated
= 13¶
-
password_reset
= 12¶
-
persona_archived
= 3¶
-
persona_change
= 2¶
-
persona_creation
= 1¶
-
persona_dearchived
= 4¶
-
persona_purged
= 5¶
-
privilege_change_approved
= 31¶
-
privilege_change_pending
= 30¶
-
privilege_change_rejected
= 32¶
-
quota_violation
= 60¶
-
realm_change
= 40¶
-
username_change
= 50¶
-
-
class
cdedb.database.constants.
CourseTrackGroupType
(value)¶ An enumeration.
-
class
cdedb.database.constants.
EventLogCodes
(value)¶ Available log messages event.log.
-
course_changed
= 41¶
-
course_created
= 40¶
-
course_deleted
= 44¶
-
course_segment_activity_changed
= 43¶
-
course_segments_changed
= 42¶
-
event_archived
= 4¶
-
event_changed
= 2¶
-
event_created
= 1¶
-
event_deleted
= 3¶
-
event_locked
= 60¶
-
event_partial_import
= 62¶
-
event_unlocked
= 61¶
-
fee_modifier_changed
= 81¶
-
fee_modifier_created
= 80¶
-
fee_modifier_deleted
= 82¶
-
field_added
= 20¶
-
field_removed
= 22¶
-
field_updated
= 21¶
-
lodgement_changed
= 25¶
-
lodgement_created
= 26¶
-
lodgement_deleted
= 27¶
-
lodgement_group_changed
= 71¶
-
lodgement_group_created
= 70¶
-
lodgement_group_deleted
= 72¶
-
minor_form_removed
= 86¶
-
minor_form_updated
= 85¶
-
orga_added
= 10¶
-
orga_removed
= 11¶
-
part_changed
= 16¶
-
part_created
= 15¶
-
part_deleted
= 17¶
-
part_group_changed
= 101¶
-
part_group_created
= 100¶
-
part_group_deleted
= 102¶
-
part_group_link_created
= 105¶
-
part_group_link_deleted
= 106¶
-
query_deleted
= 91¶
-
query_stored
= 90¶
-
questionnaire_changed
= 30¶
-
registration_changed
= 51¶
-
registration_created
= 50¶
-
registration_deleted
= 52¶
-
track_added
= 35¶
-
track_group_changed
= 111¶
-
track_group_created
= 110¶
-
track_group_deleted
= 112¶
-
track_group_link_created
= 113¶
-
track_group_link_deleted
= 114¶
-
track_removed
= 37¶
-
track_updated
= 36¶
-
-
class
cdedb.database.constants.
EventPartGroupType
(value)¶ An enumeration.
-
class
cdedb.database.constants.
FieldAssociations
(value)¶ Coordinates fields to the entities they are attached to.
-
course
= 2¶
-
lodgement
= 3¶
-
registration
= 1¶
-
-
class
cdedb.database.constants.
FieldDatatypes
(value)¶ Spec for the datatypes available as custom data fields.
-
bool
= 2¶
-
date
= 5¶
-
datetime
= 6¶
-
float
= 4¶
-
int
= 3¶
-
str
= 1¶
-
-
class
cdedb.database.constants.
FinanceLogCodes
(value)¶ Available log messages cde.finance_log.
-
deduct_membership_fee
= 11¶
-
end_trial_membership
= 12¶
-
gain_membership
= 2¶
-
grant_lastschrift
= 20¶
-
increase_balance
= 10¶
-
lastschrift_deleted
= 23¶
-
lastschrift_transaction_cancelled
= 34¶
-
lastschrift_transaction_failure
= 32¶
-
lastschrift_transaction_issue
= 30¶
-
lastschrift_transaction_revoked
= 35¶
-
lastschrift_transaction_skip
= 33¶
-
lastschrift_transaction_success
= 31¶
-
lose_membership
= 3¶
-
manual_balance_correction
= 13¶
-
modify_lastschrift
= 22¶
-
new_member
= 1¶
-
other
= 99¶ Fallback for strange cases
-
remove_balance_on_archival
= 14¶
-
revoke_lastschrift
= 21¶
-
-
class
cdedb.database.constants.
Genders
(value)¶ Spec for field gender of core.personas.
-
female
= 1¶
-
male
= 2¶
-
not_specified
= 20¶
-
other
= 10¶ this is a catch-all for complicated reality
-
-
class
cdedb.database.constants.
GenesisStati
(value)¶ Spec for field case_status of core.genesis_cases.
-
approved
= 3¶ acked by reviewer, but not yet created
-
existing_updated
= 5¶ finished (existing persona updated, challenge archived)
-
rejected
= 10¶ reviewed and rejected (also a final state)
-
successful
= 4¶ finished (persona created, challenge archived)
-
to_review
= 2¶ email confirmed, awaiting review
-
unconfirmed
= 1¶ created, data logged, email unconfirmed
-
-
class
cdedb.database.constants.
LastschriftTransactionStati
(value)¶ Basically store the outcome (if it exists) of a transaction.
-
cancelled
= 12¶
-
failure
= 11¶
-
is_finalized
() → bool¶ Whether the transaction was already tallied.
-
issued
= 1¶
-
rollback
= 20¶
-
skipped
= 2¶
-
success
= 10¶
-
-
class
cdedb.database.constants.
MailinglistDomain
(value)¶ An enumeration.
-
display_str
() → str¶ Return a readable string representation to be displayed in the UI.
-
get_acceptable_aliases
() → Set[str]¶ Return alias domains which might exist for a given type.
This is only used to allow emails to <local_part>@alias to be sent to the list members without moderation.
-
get_domain
() → str¶ Return the actual domain for this enum member.
-
-
class
cdedb.database.constants.
MailinglistTypes
(value)¶ An enumeration.
-
class
cdedb.database.constants.
MemberChangeStati
(value)¶ Spec for field code of core.changelog.
-
committed
= 2¶
-
displaced
= 12¶ replaced by a change which could not wait
-
nacked
= 11¶
-
pending
= 1¶
-
superseded
= 10¶
-
-
class
cdedb.database.constants.
MlLogCodes
(value)¶ Available log messages for ml.log.
-
automatically_removed
= 28¶
-
email_trouble
= 40¶
-
list_changed
= 2¶
-
list_created
= 1¶
-
list_deleted
= 3¶
-
marked_blocked
= 25¶ SubscriptionState.unsubscription_override
-
marked_override
= 24¶ SubscriptionState.subscription_override
-
moderate_accept
= 50¶
-
moderate_discard
= 52¶
-
moderate_reject
= 51¶
-
moderator_added
= 10¶
-
moderator_removed
= 11¶
-
request_approved
= 30¶
-
request_blocked
= 33¶
-
request_cancelled
= 32¶
-
request_denied
= 31¶
-
reset
= 27¶
-
subscribed
= 21¶ SubscriptionState.subscribed
-
subscription_changed
= 22¶ This is now used for address changes.
-
subscription_requested
= 20¶ SubscriptionState.subscription_requested
-
unsubscribed
= 23¶ SubscriptionState.unsubscribed
-
whitelist_added
= 12¶
-
whitelist_removed
= 13¶
-
-
class
cdedb.database.constants.
ModerationPolicy
(value)¶ Regulate posting of mail to a list.
-
fully_moderated
= 3¶
-
non_subscribers
= 2¶ subscribers may post without moderation, but external mail is reviewed
-
unmoderated
= 1¶
-
-
class
cdedb.database.constants.
PastEventLogCodes
(value)¶ Available log messages past_event.log.
-
course_changed
= 11¶
-
course_created
= 10¶
-
course_deleted
= 12¶
-
event_changed
= 2¶
-
event_created
= 1¶
-
event_deleted
= 3¶
-
institution_changed
= 31¶
-
institution_created
= 30¶
-
institution_deleted
= 32¶
-
participant_added
= 20¶
-
participant_removed
= 21¶
-
-
class
cdedb.database.constants.
PrivilegeChangeStati
(value)¶ Spec for field status of core.privilege_changes.
-
approved
= 2¶ approved by another admin
-
pending
= 1¶ initialized, pending for review
-
rejected
= 10¶ rejected by another admin
-
successful
= 3¶ successfully applied
-
-
class
cdedb.database.constants.
QuestionnaireUsages
(value)¶ Where a questionnaire row will be displayed.
-
allow_fee_condition
() → bool¶ Whether or not rows with this usage may use fee condition fields.
-
allow_readonly
() → bool¶ Whether or not rows with this usage are allowed to be readonly.
-
-
class
cdedb.database.constants.
RegistrationPartStati
(value)¶ Spec for field status of event.registration_parts.
-
applied
= 1¶
-
cancelled
= 5¶
-
guest
= 4¶
-
has_to_pay
() → bool¶ Any status which should pay the participation fee.
-
is_involved
() → bool¶ Any status which warrants further attention by the orgas.
-
is_present
() → bool¶ Any status which will be on site for the event.
-
not_applied
= -1¶
-
participant
= 2¶
-
rejected
= 6¶
-
waitlist
= 3¶
-
-
cdedb.database.constants.
n_
(x: str) → str¶ Clone of
cdedb.common.n_()
for marking translatable strings.