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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Available log messages cde.log.
- class cdedb.database.constants.ComplaintEntryType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Type of entries in the history of a complaint.
Some things are shown in the entries, even though they are pulled in from the logs instead. Those can not be replaced later on.
- agreement = 301
the factions reached a formal agreement as a partial resolution
- agreement_measure = 311
- definite_measure = 511
- definite_to_arbcom = 501
- faction_summary = 1001
of some companions for a faction
- generic_information = 101
- provisional_measure = 411
- provisional_statement_given = 201
- provisional_to_arbcom = 401
- revocation_explanation = 10001
Can be child of everything
- statement_cleared = 231
there has been consent to use this for further cases
- statement_received = 246
statement has been received at Vereinsarchiv
- statement_sent = 241
statement has been printed and sent to Vereinsarchiv
- statement_signed = 211
- synthesis = 1011
- class cdedb.database.constants.ComplaintInvolvementType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Types of involvements in a complaint case.
- appellant = 11
presumed not to be primarily affected. Always informed
- other = 51
especially for cases which are no actual complaints
- target = 21
whom a complaint is “against”
- withheld = 100
hides complaint even if otherwise visible to user
- class cdedb.database.constants.ComplaintKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Rough kinds a complaint may have
- class cdedb.database.constants.ComplaintLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- case_changed_end_date = 6
- case_changed_grave = 3
- case_changed_kind = 2
- case_changed_start_date = 5
- case_changed_summary = 4
- case_created = 1
- case_unlocked = 201
- companion_added = 51
- companion_reinstated = 53
- companion_removed = 54
- companion_withdrawn = 52
- concealed_case_detected = 202
- enforcer_added = 101
- enforcer_removed = 102
- involved_added = 41
- involved_informed = 46
- involved_removed = 42
- involved_uninformed = 47
- property is_historic: bool
List log codes which are relevant to display on a case history
- class cdedb.database.constants.CoreLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Available log messages core.log.
- delete_email_status = 71
- genesis_approved = 21
- genesis_change = 28
- genesis_deleted = 23
- genesis_merged = 25
- genesis_rejected = 22
- genesis_request = 20
- genesis_verified = 24
- modify_email_status = 70
- password_change = 10
- password_invalidated = 13
- password_reset = 12
- password_reset_cookie = 11
- 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
- reply_to_anonymous_message = 101
- rotate_anonymous_message = 102
- send_anonymous_message = 100
- username_change = 50
- class cdedb.database.constants.CourseTrackGroupType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.EmailStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Spec for status of core.email_status.
This is intended to be extended in future revisions. Potential further states are: whitelist, unconfirmed, mailinglists_disabled, all_disabled, removed, unsuccessful_transmission.
- classmethod notable_states() tuple[EmailStatus, ...]
States which should cause a notification.
In some locations annotating every state could get really noisy.
- class cdedb.database.constants.EventFeeBudget(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.EventFeeCategory(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.EventFeeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Different kinds of event fees, to be displayed and/or treated differently.
- class cdedb.database.constants.EventLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Available log messages event.log.
- caretaker_added = 12
- caretaker_removed = 13
- checkin_added = 500
- checkin_changed = 510
- checkin_helper_added = 800
- checkin_helper_removed = 810
- checkin_period_deleted = 530
- checkout_added = 505
- checkout_changed = 515
- course_changed = 41
- course_created = 40
- course_deleted = 44
- course_segment_activated = 431
- course_segment_created = 421
- course_segment_deactivated = 430
- course_segment_deleted = 420
- custom_filter_changed = 96
- custom_filter_created = 95
- custom_filter_deleted = 97
- event_archived = 4
- event_balanced = 600
- event_changed = 2
- event_created = 1
- event_deleted = 3
- event_fee_created = 80
- event_fee_deleted = 82
- event_fee_modified = 81
- event_locked = 60
- event_partial_import = 62
- event_unbalanced = 610
- event_unlocked = 61
- field_added = 20
- field_pruned = 6001
- field_removed = 22
- field_updated = 21
- helper_added = 7
- helper_removed = 8
- 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
- orga_token_changed = 201
- orga_token_created = 200
- orga_token_deleted = 203
- orga_token_revoked = 202
- 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
- personalized_fee_amount_deleted = 401
- personalized_fee_amount_set = 400
- query_deleted = 91
- query_stored = 90
- questionnaire_changed = 30
- registration_approved = 700
- registration_changed = 51
- registration_created = 50
- registration_deleted = 52
- registration_payment_received = 55
- registration_payment_received_orga = 57
- registration_payment_reimbursed = 56
- registration_payment_reimbursed_orga = 58
- registration_status_changed = 300
- registration_unapproved = 710
- 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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.FieldAssociations(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Coordinates fields to the entities they are attached to.
- course = 2
- lodgement = 3
- registration = 1
- class cdedb.database.constants.FieldDatatypes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Spec for the datatypes available as custom data fields.
- bool = 2
- date = 5
- datetime = 6
- float = 4
- iban = 30
- int = 3
- non_negative_float = 12
- non_negative_int = 10
- phone = 20
- str = 1
- str_monospace = 55
- str_multiline = 50
- class cdedb.database.constants.FinanceLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Available log messages cde.finance_log.
- deduct_membership_fee = 11
- end_trial_membership = 12
- gain_membership = 2
- grant_lastschrift = 20
- honorary_membership_granted = 51
- honorary_membership_revoked = 52
- 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
- other = 99
Fallback for strange cases
- remove_balance_on_archival = 14
- remove_exmember_balance = 17
- revoke_lastschrift = 21
- start_trial_membership = 15
- class cdedb.database.constants.Genders(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Spec for field 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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.LockType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Types of Locks.
- mailman = 1
- class cdedb.database.constants.MailinglistDomain(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- 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.MailinglistRosterVisibility(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Visibility of the subscriber list to non-moderators or admins.
Roster of inactive mailinglists are always hidden.
- class cdedb.database.constants.MailinglistTypes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.MlLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.NotifyOnRegistration(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Options for how often orgas want to be notified about new registrations.
- class cdedb.database.constants.PastEventLogCodes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Available log messages past_event.log.
- course_assignment_removed = 26
- course_assignment_set = 25
- course_changed = 11
- course_created = 10
- course_deleted = 12
- event_changed = 2
- event_created = 1
- event_deleted = 3
- participant_removed = 21
- participant_set = 20
- class cdedb.database.constants.PastInstitutions(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Insitutions for (primarily past) events, used for sorting into categories.
- basf = 80
- bub = 70
- cde = 1
- dja = 40
- dsa = 20
- eisenberg = 400
- jgw = 60
- other = 1000
- private = 2000
- van = 200
- class cdedb.database.constants.PastInstructorKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.PastMusicKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Kinds of ‘Kursübergreifende Musik’ organizers.
- class cdedb.database.constants.PastOrgaKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
CdE, DSA, JGW etc have different notions of ‘Orgas’.
- class cdedb.database.constants.PersonaChangeStati(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.PrivilegeChangeStati(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.QuestionnairePanelKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.QuestionnaireRowRole(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
- class cdedb.database.constants.QuestionnaireUsages(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.
- property title_level: int
Heading-level for custom titles in this kind of questionnaire.
- class cdedb.database.constants.RegistrationPartStati(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
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.