Skip to content

Commit

Permalink
Merge pull request #454 from magfest/super2025
Browse files Browse the repository at this point in the history
Merge Super 2025 to main branch
  • Loading branch information
kitsuta authored Oct 7, 2024
2 parents e76df8c + bc91fe7 commit 6a8974a
Show file tree
Hide file tree
Showing 30 changed files with 353 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BRANCH=main
ARG BRANCH=super2025
FROM ghcr.io/magfest/ubersystem:${BRANCH}
ENV uber_plugins=["magprime"]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
"""Add external sync, created, and last updated columns to magprime tables
Revision ID: 3b1f31ec9f24
Revises: 0173330bfb6e
Create Date: 2024-08-01 02:30:54.112080
"""


# revision identifiers, used by Alembic.
revision = '3b1f31ec9f24'
down_revision = '0173330bfb6e'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
import residue


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('prev_season_supporter', sa.Column('created', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False))
op.add_column('prev_season_supporter', sa.Column('last_updated', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False))
op.add_column('prev_season_supporter', sa.Column('external_id', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False))
op.add_column('prev_season_supporter', sa.Column('last_synced', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False))
op.add_column('season_pass_ticket', sa.Column('created', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False))
op.add_column('season_pass_ticket', sa.Column('last_updated', residue.UTCDateTime(), server_default=sa.text("timezone('utc', current_timestamp)"), nullable=False))
op.add_column('season_pass_ticket', sa.Column('external_id', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False))
op.add_column('season_pass_ticket', sa.Column('last_synced', postgresql.JSONB(astext_type=sa.Text()), server_default='{}', nullable=False))


def downgrade():
op.drop_column('season_pass_ticket', 'last_synced')
op.drop_column('season_pass_ticket', 'external_id')
op.drop_column('season_pass_ticket', 'last_updated')
op.drop_column('season_pass_ticket', 'created')
op.drop_column('prev_season_supporter', 'last_synced')
op.drop_column('prev_season_supporter', 'external_id')
op.drop_column('prev_season_supporter', 'last_updated')
op.drop_column('prev_season_supporter', 'created')
2 changes: 1 addition & 1 deletion magprime/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class BadgeExtras:
], widget=NumberInputWithChoices(choices=c.SUPERSTAR_DONATION_OPTS))

def extra_donation_label(self):
return Markup("Superstar Donation ({})".format(popup_link("../static_views/givingExtra.html", "Learn more")))
return Markup("Superstar Donation ({})".format(popup_link("https://super.magfest.org/superstars", "Learn more")))

@MagForm.form_mixin
class AdminBadgeExtras:
Expand Down
17 changes: 16 additions & 1 deletion magprime/model_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,19 @@ def address(attendee):
if not attendee.region and attendee.country in ['United States', 'Canada']:
return 'Please enter a state, province, or region.'
if not attendee.country:
return 'Please enter a country.'
return 'Please enter a country.'


@validation.GuestTravelPlans
def has_modes(guest_travel_plans):
return


@validation.GuestTravelPlans
def has_modes_text(guest_travel_plans):
return


@validation.GuestTravelPlans
def has_details(guest_travel_plans):
return
2 changes: 1 addition & 1 deletion magprime/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def accoutrements(self):
def check_in_notes(self):
notes = []
if self.age_group_conf['consent_form']:
notes.append("Before checking this attendee in, please collect a signed parental consent form, which must be notarized if the guardian is not there. If the guardian is there, and they have not already completed one, have them sign one in front of you.")
notes.append("Before checking this attendee in, please collect a signed parental consent form. If the guardian is there, and they have not already completed one, have them sign one in front of you.")

if self.accoutrements:
notes.append(f"Please check this attendee in {self.accoutrements}.")
Expand Down
Binary file modified magprime/static/icons/shirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified magprime/static/icons/super.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified magprime/static/icons/supporter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added magprime/static/images/superstar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified magprime/static/swag/shirt-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified magprime/static/swag/super-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified magprime/static/swag/supporter-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed magprime/static/theme/superstar.png
Binary file not shown.
2 changes: 2 additions & 0 deletions magprime/templates/emails/dealers/approved.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
You may do this by <a href="{{ c.URL_BASE }}/preregistration/group_members?id={{ group.id }}">clicking here</a>.
{% endif %}

<br/> <br/> <strong>Important Note</strong>: While reviewing applications for this year we noticed there were many errors in names, addresses, and contact info. Please be sure to confirm and/or update your information before paying. We will use the table name, badge name, and address on the application when we turn information over to the Maryland Comptroller. You are responsible for any errors.

<br/> <br/><strong>Tax Information <span style="color:red">*MUST READ*</span></strong>
<p>All sellers in the Marketplace are required to obtain a Seller's Permit from the State of Maryland.
To ease the burden on the Comptroller's office for issuing mass permits, we submit the names & information of our sellers
Expand Down
24 changes: 12 additions & 12 deletions magprime/templates/emails/precon_faqs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<body>

You are receiving this e-mail because you are pre-registered to attend {{ c.EVENT_NAME_AND_YEAR }}.
Please refer to this FAQ for instructions on how to get your badge, and how to view the schedule.
Please refer to this FAQ for instructions on how to get your badge, where to pick up merch, how to view the schedule, and other useful information.

<br/> <br/>

Expand All @@ -12,28 +12,28 @@
When you arrive at MAGFest, go to Registration, located in Expo Hall E, to pick up your badge. Once Registration opens on Thursday morning, usually at 10:00 AM, it will stay open until Sunday afternoon at 1:00 PM, with three exceptions. Registration will close between 4:00AM and 7:00AM Friday, Saturday, and Sunday mornings. Please bring a government-issued photo id such as a driver's license or military id.
</p>
<p>
<b> Will additional badges be sold at the door?</b><br />
Yes, but there is a possibility of us selling out, so check our website for any badge availability alerts.
<b>Will additional badges be sold at the door?</b><br />
Badges will be available online until we sell out, which may occur during pre-registration. Please view our website and social media for any badge availability alerts.
</p>
<p>
<b>Which registration line do I use?</b>
<ul>
<li>Staff, Bands, Guests, Vendors, Indie showcase exhibitors, and Volunteers share the same line. Look for the signage inside Expo Hall E.</li>
<li>Contractors, Staff, Volunteer, Bands, Guests, Vendors, and Indie showcase exhibitors share the same line. Look for the signage inside Expo Hall E.</li>
<li>All other pre-registered attendees (including those who purchased group registrations) should use the "Pre-Registration Badge Pickup" line inside Expo Hall E.</li>
<li>If you are accompanied by people who have not pre-registered, they can <a href="{{ c.URL_BASE }}/preregistration/form" target="_blank"><b>purchase one online</b></a>.</li>
<li>If you are accompanied by people who have not pre-registered, they can <a href="{{ c.URL_BASE }}/preregistration/form" target="_blank"><b>purchase one online</b></a>, as long as badges are still available.</li>
</ul>
</p>
<p>
<b>Where can I pick up swag that I pre-ordered, such as a t-shirt or supporter bundle?</b><br />
After you've picked up your badge, you can pick up your swag at the MAGFest merch booth. The merch booth is located at the front of Expo Hall C. Use <a href="https://images.squarespace-cdn.com/content/v1/58f0f670ff7c50d19776494d/642d3da1-587d-448b-90a3-ff95cdbf1028/2024-Map.jpg" target="_blank"><b>this map</b></a> to help find your way to the merch booth from the registration area.
<b>Where can I pick up the merch that I pre-ordered?</b><br />
After you've picked up your badge, you can pick up your swag at the front of Expo Hall E.
</p>
<p>
<b>Where can I find all the other cool stuff happening after I pick up my badge and merch?</b><br/>
Use <a href="https://images.squarespace-cdn.com/content/v1/58f0f670ff7c50d19776494d/642d3da1-587d-448b-90a3-ff95cdbf1028/2024-Map.jpg" target="_blank">this map</a> to help find your way around the event.
</p>
<p>
<b>Where can I view a schedule of events?</b><br />
There are multiple ways to view our schedule:</p>
<ul>
<li><i>Using the Guidebook app or website (desktop or mobile)</i>: Go to the <a href="https://super.magfest.org/schedule" target="_blank">Guidebook website</a> to view the guidebook in your web browser or download the mobile app. Make sure to check for guidebook updates periodically through the weekend, as we may make schedule changes.</li>
<li><i>Paper schedules</i>: Printed schedules will be available in limited quantities at Registration and our Info Desk. Please consider using guidebook instead to save paper.</li>
</ul>
Go to the <a href="https://super.magfest.org/schedule" target="_blank">Guidebook website</a> to view the guidebook in your web browser or download the mobile app. Make sure to check for guidebook updates periodically through the weekend, as we may make schedule changes.
</p>
{% if attendee.is_transferable %}
<p>
Expand Down
2 changes: 1 addition & 1 deletion magprime/templates/emails/reg_workflow/badge_transfer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If {{ new.full_name }} needs to add or update the information associated with th

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 bonus items such as a ribbon, t-shirt, or supporter package, you can pick those up at our merchandise booth. The location and hours of the registration desk and merchandise booth will be e-mailed prior to the event. {% if c.CONSENT_FORM_URL and new.age_group_conf['consent_form'] %}

Our records indicate that {{ new.full_name }} is under the age of 18, and as such, 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 }}.
Our records indicate that {{ new.full_name }} is under the age of 18, and as such, 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. 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={{ new.id }} before {{ c.UBER_TAKEDOWN|datetime_local }}.
{% endif %}
Expand Down
46 changes: 46 additions & 0 deletions magprime/templates/emails/reg_workflow/group_confirmation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<html>
<head></head>
<body>

Your {{ group.is_dealer|yesno(c.DEALER_REG_TERM + ",group") }} ({{ group.name }}) has been preregistered for
{{ c.EVENT_NAME }} this coming {{ event_dates() }} and your payment of {{ (group.amount_paid / 100)|format_currency }} has been received.

{% if group.unregistered_badges %}
<br/> <br/>
Some of your badges are not yet assigned to a specific person. If you assign these badges
now then it will take much less time for their owners to pick them up at the event. Preassigning
badges also allows individual members of your group to preorder merch or donate
extra money. You may preassign your badges on your
<a href="{{ c.URL_BASE }}/preregistration/group_members?id={{ group.id }}">group management page</a>.
The individual registration links on the group management page can be filled out by you, or distributed
to your group members for them to fill out themselves.

<b>Your</b> registration confirmation number is {{ group.leader_id }}, and you can update your information, preorder merch,
or donate extra money <a href="{{ c.URL_BASE }}/preregistration/confirm?id={{ group.leader_id }}">here</a>.

{% if not group.is_dealer %}
<br/> <br/>
Please email your {{ c.EVENT_NAME }} contact regarding adding badges to your group. You may be asked to pay for the extra badges after the badges are added.
{% endif %}
{% endif %}

{% if c.CONSENT_FORM_URL and group.leader.age_group_conf['consent_form'] %}
<br/> <br/>
Because you are under 18, you must bring a <a href="{{ c.CONSENT_FORM_URL }}">signed parental
consent form</a> to be granted admission to {{ c.EVENT_NAME }}.
<br/> <br/>
If you are over 18, update your date of birth on your
<a href="{{ c.URL_BASE }}/preregistration/confirm?id={{ group.leader.id }}">badge confirmation page</a>.
{% endif %}

<br/> <br/>
Badges are not mailed out before the event, so your group members may pick up their badge at Registration
when they arrive at {{ c.EVENT_NAME }}. Inform your group to bring a photo ID{{ c.EXTRA_CHECKIN_DOCS }} to Registration,
where they'll be provided with their badge. If anyone in your group pre-ordered a t-shirt or other merch package,
they can pick those up at our merchandise booth. The location and
hours of Registration and merchandise booth will be emailed prior to the event.
<br/> <br/>
You can always <a href="{{ c.URL_BASE }}/preregistration/group_members?id={{ group.id }}">use this link</a> to manage your group.

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<head></head>
<body>

You have successfully registered group "{{ group.name }}" for {{ c.EVENT_NAME }} this coming {{ event_dates() }} and your payment of {{ (group.buyer.amount_paid / 100)|format_currency }} has been received. Your group has {{ group.promo_codes|length|int + 1 }} badges, including your own.

<br/><br/>
Group badges are allocated using promo codes: your group members will simply enter a promo code <a href="{{ c.URL_BASE }}/preregistration/">while preregistering</a> to claim a badge in your group.
You can either allocate specific promo codes for each group member using your <a href="{{ c.URL_BASE }}/preregistration/group_promo_codes?id={{ group.id }}">group management page</a> or distribute your group's universal promo code ("{{ group.code }}"), which will let people claim badges in your group until it has no more available badges.

<br/><br/>
You may edit your own registration <a href="{{ c.URL_BASE }}/preregistration/confirm?id={{ group.buyer.id }}">here</a>.

{% if c.CONSENT_FORM_URL and group.buyer.age_group_conf['consent_form'] %}
<br/> <br/>
Because you are under 18, you must bring a <a href="{{ c.CONSENT_FORM_URL }}">signed parental
consent form</a> to be granted admission to {{ c.EVENT_NAME }}.
<br/> <br/>
If you are over 18, update your date of birth on your
<a href="{{ c.URL_BASE }}/preregistration/confirm?id={{ group.leader.id }}">badge confirmation page</a>.
{% endif %}

<br/> <br/>
Badges are not mailed out before the event, so your group members may pick up their badge at Registration when they arrive
at {{ c.EVENT_NAME }}. Inform your group to bring a photo ID{{ c.EXTRA_CHECKIN_DOCS }} to Registration,
where they'll be provided with their badge. If anyone in your group pre-orders a t-shirt or other merch package,
they can pick those up at our merchandise booth. The location and
hours of Registration and merchandise booth will be emailed prior to the event.
<br/> <br/>

</body>
</html>
32 changes: 32 additions & 0 deletions magprime/templates/emails/reg_workflow/reg_notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% if attendee.staffing and not attendee.assigned_depts %}
<br><br>
Thanks for your interest in volunteering!
{% if attendee.paid == c.HAS_PAID %}
Now that we've received your payment
{% elif attendee.paid == c.PAID_BY_GROUP %}
As soon as we get a chance,
{% else %}
After we receive your payment
{% endif %}
we will review your request to volunteer at {{ c.EVENT_NAME }}. If you are selected, we will email further
instructions about your department assignment and how to sign up for shifts.
{% endif %}

{% if c.CONSENT_FORM_URL and attendee.age_group_conf['consent_form'] %}
<br><br>
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/legal guardian will
be present at {{ c.EVENT_NAME }}, then they can sign the consent form when
you pick up your badge at Registration in Expo Hall E. If a parent/legal
guardian will not be at the event, the form may be brought pre-signed.
You may find the form <a href="{{ c.CONSENT_FORM_URL }}">by clicking here</a>.
<br><br>
If you are actually over 18, please update your age in our
<a href="{{ c.URL_BASE }}/preregistration/confirm?id={{ attendee.id }}">database here</a>
prior to picking up your badge.
{% endif %}

{% if c.CODE_OF_CONDUCT_URL %}
<br><br>
Registered attendees agree to the <a href="{{ c.CODE_OF_CONDUCT_URL }}">{{ c.EVENT_NAME }} code of conduct</a> by picking up their badge.
{% endif %}
9 changes: 9 additions & 0 deletions magprime/templates/emails/reg_workflow/under_18_reminder.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ attendee.first_name }},

Thanks for pre-registering for {{ c.EVENT_NAME }}. 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/legal 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/legal guardian will not be at the event, the form may be brought pre-signed. You may find the form at {{ c.CONSENT_FORM_URL }}.

If you are actually over 18, please update your age in our database at {{ c.URL_BASE }}/preregistration/confirm?id={{ attendee.id }} prior to picking up your badge.

We look forward to seeing you at {{ c.EVENT_NAME_AND_YEAR }}!

{{ c.REGDESK_EMAIL_SIGNATURE }}
Loading

0 comments on commit 6a8974a

Please sign in to comment.