-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows attendees to transfer badges using codes, including a way to check the transferer's code against the system.
- Loading branch information
Showing
12 changed files
with
410 additions
and
18 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
alembic/versions/300b55d2f88c_add_transfer_code_to_attendees.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
"""Add transfer code to attendees | ||
Revision ID: 300b55d2f88c | ||
Revises: f6dc67fe7eea | ||
Create Date: 2025-01-05 17:24:22.176562 | ||
""" | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '300b55d2f88c' | ||
down_revision = 'f6dc67fe7eea' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
|
||
try: | ||
is_sqlite = op.get_context().dialect.name == 'sqlite' | ||
except Exception: | ||
is_sqlite = False | ||
|
||
if is_sqlite: | ||
op.get_context().connection.execute('PRAGMA foreign_keys=ON;') | ||
utcnow_server_default = "(datetime('now', 'utc'))" | ||
else: | ||
utcnow_server_default = "timezone('utc', current_timestamp)" | ||
|
||
def sqlite_column_reflect_listener(inspector, table, column_info): | ||
"""Adds parenthesis around SQLite datetime defaults for utcnow.""" | ||
if column_info['default'] == "datetime('now', 'utc')": | ||
column_info['default'] = utcnow_server_default | ||
|
||
sqlite_reflect_kwargs = { | ||
'listeners': [('column_reflect', sqlite_column_reflect_listener)] | ||
} | ||
|
||
# =========================================================================== | ||
# HOWTO: Handle alter statements in SQLite | ||
# | ||
# def upgrade(): | ||
# if is_sqlite: | ||
# with op.batch_alter_table('table_name', reflect_kwargs=sqlite_reflect_kwargs) as batch_op: | ||
# batch_op.alter_column('column_name', type_=sa.Unicode(), server_default='', nullable=False) | ||
# else: | ||
# op.alter_column('table_name', 'column_name', type_=sa.Unicode(), server_default='', nullable=False) | ||
# | ||
# =========================================================================== | ||
|
||
|
||
def upgrade(): | ||
op.add_column('attendee', sa.Column('transfer_code', sa.Unicode(), server_default='', nullable=False)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('attendee', 'transfer_code') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{ attendee.first_name }}, | ||
|
||
Your pending {{ c.EVENT_NAME }} badge with the transfer code {{ transferee_code }} has now been activated using transfer code {{ transferer_code }}. This means you now have a valid registration for {{ c.EVENT_NAME }}! | ||
|
||
You can use this link to view or update your badge: {{ c.URL_BASE }}/preregistration/confirm?id={{ attendee.id }} | ||
|
||
Badges are not mailed out before the event, so your badge will be available for pickup at the registration desk when you arrive at {{ c.EVENT_NAME }}. Simply bring a photo ID to the registration desk, where you'll be provided with your badge. If you ordered any merchandise, you can pick those up at our merchandise booth. The location and hours of the registration desk and merchandise booth will be emailed prior to the event. {% if c.CONSENT_FORM_URL and attendee.age_group_conf['consent_form'] %} | ||
|
||
Our records indicate that you are under the age of 18, and as such, you will need a signed parental consent form. If a parent/guardian will be present at {{ c.EVENT_NAME }}, then they can sign the consent form when you pick up your badge at the registration desk. If a parent/guardian will not be at the event, the form may be brought pre-signed, however it MUST be notarized. We will not accept pre-signed forms that are not notarized. You may find the form at {{ c.CONSENT_FORM_URL }}. | ||
|
||
If you are actually over 18, you can update your age in our database at {{ c.URL_BASE }}/preregistration/confirm?id={{ attendee.id }} before {{ c.UBER_TAKEDOWN|datetime_local }}. | ||
{% endif %} | ||
|
||
If this has happened in error, please contact {{ c.SECURITY_EMAIL|safe }}. Otherwise we look forward to seeing you on {{ event_dates() }}. | ||
|
||
{{ c.REGDESK_EMAIL_SIGNATURE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{ attendee.first_name }}, | ||
|
||
You have successfully transferred your {{ c.EVENT_NAME }} {{ attendee.badge_type_label }} registration to badge code {{ transferee_code }} using your transfer code {{ transferer_code }}. This means you no longer have a paid registration for {{ c.EVENT_NAME }}. | ||
|
||
If this has happened in error, please contact {{ c.SECURITY_EMAIL|safe }}. Otherwise, we hope to see you next year! | ||
|
||
{{ c.REGDESK_EMAIL_SIGNATURE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.