Skip to content

Commit

Permalink
Merge pull request #4261 from magfest/band-checklist-2023
Browse files Browse the repository at this point in the history
Update band checklist for 2023
  • Loading branch information
kitsuta authored Oct 5, 2023
2 parents 168da48 + d809b10 commit db703f4
Show file tree
Hide file tree
Showing 27 changed files with 282 additions and 82 deletions.
70 changes: 70 additions & 0 deletions alembic/versions/3ec57493ad18_add_new_fields_for_band_checklist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"""Add new fields for band checklist
Revision ID: 3ec57493ad18
Revises: ceb6dd682832
Create Date: 2023-10-05 01:00:24.836124
"""


# revision identifiers, used by Alembic.
revision = '3ec57493ad18'
down_revision = 'ceb6dd682832'
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():
with op.batch_alter_table("guest_autograph") as batch_op:
batch_op.add_column(sa.Column('rock_island_autographs', sa.Boolean(), nullable=True))
batch_op.add_column(sa.Column('rock_island_length', sa.Integer(), server_default='60', nullable=False))

with op.batch_alter_table("guest_bio") as batch_op:
batch_op.add_column(sa.Column('spotify', sa.Unicode(), server_default='', nullable=False))

with op.batch_alter_table("guest_stage_plot") as batch_op:
batch_op.add_column(sa.Column('notes', sa.Unicode(), server_default='', nullable=False))


def downgrade():
op.drop_column('guest_stage_plot', 'notes')
op.drop_column('guest_bio', 'spotify')
op.drop_column('guest_autograph', 'rock_island_length')
op.drop_column('guest_autograph', 'rock_island_autographs')
9 changes: 8 additions & 1 deletion uber/configspec.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1711,14 +1711,21 @@ maybe = string(default="We might need rehearsal space; please contact us about o
yes = string(default="We definitely need rehearsal space; please contact us about our needs.")

[[merch_types]]
cd = string(default="CD")
cd = string(default="Album")
tshirt = string(default="T-Shirt")
apparel = string(default="Other Apparel")
pin = string(default="Pin")
sticker = string(default="Sticker")
poster = string(default="Poster")
miscellaneous = string(default="Miscellaneous")

[[album_media]]
cd = string(default="CD")
cassette = string(default="Cassette")
vinyl = string(default="Vinyl")
flash_drive = string(default="Flash Drive")
download = string(default="Download Code")

[[apparel_varieties]]
youth = string(default="Youth")
womens = string(default="Women's")
Expand Down
10 changes: 10 additions & 0 deletions uber/models/guests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ def badges_status(self):
@property
def taxes_status(self):
return "Not Needed" if not self.payment else self.status('taxes')

@property
def merch_status(self):
if self.merch and self.merch.selling_merch == c.ROCK_ISLAND and not self.merch.poc_address1:
return None
return self.status('merch')

@property
def panel_status(self):
Expand Down Expand Up @@ -237,6 +243,7 @@ class GuestBio(MagModel):
twitch = Column(UnicodeText)
bandcamp = Column(UnicodeText)
discord = Column(UnicodeText)
spotify = Column(UnicodeText)
other_social_media = Column(UnicodeText)
teaser_song_url = Column(UnicodeText)

Expand Down Expand Up @@ -284,6 +291,7 @@ class GuestStagePlot(MagModel):
guest_id = Column(UUID, ForeignKey('guest_group.id'), unique=True)
filename = Column(UnicodeText)
content_type = Column(UnicodeText)
notes = Column(UnicodeText)

@property
def url(self):
Expand Down Expand Up @@ -616,6 +624,8 @@ class GuestAutograph(MagModel):
guest_id = Column(UUID, ForeignKey('guest_group.id'), unique=True)
num = Column(Integer, default=0)
length = Column(Integer, default=60) # session length in minutes
rock_island_autographs = Column(Boolean, nullable=True)
rock_island_length = Column(Integer, default=60) # session length in minutes

@presave_adjustment
def no_length_if_zero_autographs(self):
Expand Down
4 changes: 3 additions & 1 deletion uber/site_sections/guests.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ def merch(self, session, guest_id, message='', coverage=False, warning=False, **
'guest': guest,
'guest_merch': guest_merch,
'group': group_params or guest.group,
'message': message
'message': message,
'agreed_to_ri_faq': guest.group_type == c.BAND and guest_merch and guest_merch.orig_value_of('selling_merch') != c.NO_MERCH and guest_merch.poc_address1,
}

@ajax
Expand Down Expand Up @@ -296,6 +297,7 @@ def autograph(self, session, guest_id, message='', **params):
guest_autograph = session.guest_autograph(params)
if cherrypy.request.method == 'POST':
guest_autograph.length = 60 * int(params['length']) # Convert hours to minutes
guest_autograph.rock_island_length = 60 * int(params['rock_island_length']) # Convert hours to minutes
guest.autograph = guest_autograph
session.add(guest_autograph)
raise HTTPRedirect('index?id={}&message={}', guest.id, 'Your autograph sessions have been saved')
Expand Down
3 changes: 2 additions & 1 deletion uber/templates/guest_checklist/autograph_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ <h2>{% block form_title %}Autographs for {{ guest.group.name }}{% endblock %}</h
<label class="col-sm-3 control-label">Length of Sessions (hours)</label>
<div class="col-sm-6">
<select name="length" class="form-control">
{{ int_options(1, 3, length_hours) }}
{% set max_hours = 2 if guest.group_type == c.BAND else 3 %}
{{ int_options(1, max_hours, length_hours) }}
</select>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions uber/templates/guest_checklist/badges_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
{% block deadline_text %}
{% if guest.all_badges_claimed %}
You have already assigned all badges which have been assigned to your group, but you may change who your
complementary badges are assigned to using the link above anytime until the start of {{ c.EVENT_NAME }}.
complimentary badges are assigned to using the link above anytime until the start of {{ c.EVENT_NAME }}.
{% else %}
You currently have {{ guest.group.floating|length }} unassigned complementary
<p>You currently have {{ guest.group.floating|length }} unassigned complimentary
badge{{ guest.group.floating|length|pluralize }} available to your group. You may use the link above to
assign these badges.
assign these badges.</p>
{% endif %}
<br/><br/>
By default, each guest receives a badge for themselves, plus an additional badge.
Expand Down
50 changes: 50 additions & 0 deletions uber/templates/guest_checklist/band_autograph_deadline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% extends "guest_checklist/autograph_deadline.html" %}

{% block deadline_text %}
{% if guest.autograph_status %}
You have already indicated
{% if not guest.autograph.num %}
that you do not wish to hold any autograph sessions,
{% else %}
that you would like
{% if guest.autograph.num %}
{{ guest.autograph.num }} autograph session{{ guest.autograph.num|pluralize }},
{% if guest.autograph.rock_island_autographs %} plus {% endif %}
{% endif %}
{% if guest.autograph.rock_island_autographs %}
a {{ guest.autograph.rock_island_length // 60 }}-hour meet-and-greet at Rock Island,
{% endif %}
{% endif %}
but you can use the link above to update your preferences.
{% else %}
Use the link above to let us know if you would like to host any autograph sessions and/or if you would like a Meet & Greet at Rock Island.
{% endif %}
{% endblock %}

{% block form_extra %}
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">If you would like to have a Meet & Greet in Rock Island, please indicate below.</div>
<div class="col-sm-6 col-sm-offset-3">
<select name="rock_island_autographs" class="form-control">
<option value="">Please select an option...</option>
<option value="1" {% if guest.autograph.rock_island_autographs %}selected {% endif %}>Yes</option>
<option value="0" {% if guest.autograph.rock_island_autographs == False %}selected {% endif %}>No</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Length of Sessions (hours)</label>
<div class="col-sm-6">
<select name="rock_island_length" class="form-control">
{% set rock_island_length_hours = guest.autograph.rock_island_length//60 %}
{{ int_options(1, 2, rock_island_length_hours) }}
</select>
</div>
</div>

<p>Note: You are allowed to have both an autograph session with the Autographs Department and a Meet & Greet in Rock Island or any other combination. Autographs should only be done at these two locations.</p>

<p>The Rock Island Meet & Greet is a chance to sign merch purchased during the event, pose for pictures, and generally have a chance to talk to your fans after the show. This will occur in the Rock Island area of the Main Concert Hall.</p>

<p>The Autograph Session is a more formal signing session designed to be a quieter, more intimate experience for attendees and performers. Autograph sessions can occur any time throughout the weekend and will appear on the schedule. Sessions are held in Autographs, located in Expo E.</p>
{% endblock %}
15 changes: 15 additions & 0 deletions uber/templates/guest_checklist/band_badges_deadline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "guest_checklist/badges_deadline.html" %}

{% block deadline_text %}
{% if guest.all_badges_claimed %}
You have already assigned all badges which have been assigned to your group, but you may change who your
complimentary badges are assigned to using the link above anytime until the start of {{ c.EVENT_NAME }}.
{% else %}
<p>You currently have {{ guest.group.floating|length }} unassigned complimentary
badge{{ guest.group.floating|length|pluralize }} available to your group. You may use the link above to
assign these badges.</p>
{% endif %}
By default, each guest receives a badge for themselves, plus an additional badge.
Additional complimentary badges may be issued upon request by reaching out to {{ c.BAND_EMAIL|email_only|email_to_link }}
or your assigned liaison.
{% endblock %}
8 changes: 8 additions & 0 deletions uber/templates/guest_checklist/band_bio_deadline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "guest_checklist/bio_deadline.html" %}

{% block deadline_headline %}Performer Announcement Information{% endblock %}

{% block form_desc %}
Please provide a short bio that we can use on our website and in social media announcements leading up to the event.
Everything else is optional, but is extremely helpful in promoting you to our attendees.
{% endblock %}
12 changes: 12 additions & 0 deletions uber/templates/guest_checklist/band_charity_deadline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "guest_checklist/charity_deadline.html" %}

{% block deadline_text %}
{% if guest.charity_status %}
You have already indicated your charity preferences, but you may update them using the link above.
{% else %}
{{ c.EVENT_NAME }} hosts a yearly charity auction, with 100% of proceeds going to
<a href="http://childsplaycharity.org/" target="_blank">Child's Play</a>.
Use the link above to indicate if you would be willing to donate any signed merchandise to the auction or
would be able to assist in any other way.
{% endif %}
{% endblock %}
80 changes: 33 additions & 47 deletions uber/templates/guest_checklist/band_merch_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,50 @@
{% if guest.merch_status %}
You have already indicated your merchandise preferences, but you may update them using the link above.
{% else %}
We need you to tell us whether you have any merchandise to sell{% if HAS_ROCK_ISLAND %},
and whether you intend to participate in our "Rock Island" program where we sell your merchandise so that you do
not need to staff your own table{% endif %}.
Use the link above to provide details on any merchandise you are bringing to
sell{% if HAS_ROCK_ISLAND %} in 'Rock Island', our volunteer-run merch booth{% endif %}.
{% endif %}
{% endblock %}

{% block form_desc %}
{{ super() }}

<p>
For mainstage performers, on the night of your performance, a full table will also be provided immediately across
from the entrance to the concert hall for merchandise sales and signings.
</p>
<p>MAGFest will provide access to our Rock Island Merch Department during the event.</p>

<p>
<a href="../static/RockIsland.pdf">
Click here for more info about our Rock Island service!
</a>
</p>

<p>
For mainstage performers, on the night of your performance, a full table will also be provided immediately across
from the entrance to the concert hall for merchandise sales and signings.
</p>
{% endblock %}

{% block form_extra %}
{{ super() }}

<div id="coverage" style="display:none">
{% if c.REQUIRE_DEDICATED_GUEST_TABLE_PRESENCE %}
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3 checkbox">
<label class="checkbox-label">
<input type="checkbox" name="coverage" value="yes" />
I commit to staffing our table in the marketplace at least <b>8 hours per day</b>.
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3 checkbox">
<label class="checkbox-label">
<input type="checkbox" name="warning" value="yes" />
I acknowledge that failing to staff our table for <b>8 hours per day</b> will revoke
the privilege of selling our merchandise from our own dedicated table in the future.
</label>
</div>
</div>
{% endif %}
<div class="form-group" id="confirm-ri-faq">
<div class="col-sm-9 col-sm-offset-3 checkbox">
{{ macros.toggle_checkbox(
'#save-merch-button',
'I acknowledge that I have read & understood the <a href="../static/RockIsland.pdf">Rock Island FAQ</a>, including the hours and policies.'|safe,
suffix='_agreed_ri_faq',
mode='#save-merch-button',
hide_on_checked=False,
checked=agreed_to_ri_faq) }}
</div>
</div>

<script>
var checkCoverage = function() {
var isDedicated = $.val('selling_merch') === {{ c.OWN_TABLE }};
setVisible('#coverage', isDedicated);

{% if c.REQUIRE_DEDICATED_GUEST_TABLE_PRESENCE %}
var allChecked = $.field('coverage').prop('checked') && $.field('warning').prop('checked');
$('input[type="submit"]').prop('disabled', isDedicated && !allChecked);
{% endif %}
};

$(function () {
checkCoverage();
{% if c.REQUIRE_DEDICATED_GUEST_TABLE_PRESENCE %}
$.field('warning').on('click', checkCoverage);
$.field('coverage').on('click', checkCoverage);
{% endif %}
$.field('selling_merch').on('change', checkCoverage);
});
var showOrRIFaq = function() {
setVisible('#confirm-ri-faq', $.val('selling_merch') === {{ c.ROCK_ISLAND }});
$('#save-merch-button').prop('disabled', $.val('selling_merch') === {{ c.ROCK_ISLAND }} && !$('#toggle_visibility_agreed_ri_faq').prop('checked'));
};
$(function () {
$("[name='selling_merch'] option[value='{{ c.OWN_TABLE }}']").remove();
showOrRIFaq();
$.field('selling_merch').on('change', showOrRIFaq);
});
</script>
{% endblock %}
1 change: 1 addition & 0 deletions uber/templates/guest_checklist/band_panel_deadline.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "guest_checklist/panel_deadline.html" %}

{% block deadline_text %}
{% if not guest.group.leader.panel_applications %}
Are you interested in running a panel at MAGFest? Please tell us what you would like to plan and
Expand Down
9 changes: 9 additions & 0 deletions uber/templates/guest_checklist/bio_deadline.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ <h2>{% block form_title %}Social Media Info for {{ guest.group.name }}{% endbloc
</div>
</div>

{% if guest.group_type == c.BAND %}
<div class="form-group">
<label class="col-sm-3 control-label optional-field">Spotify</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="spotify" value="{{ guest_bio.spotify }}" />
</div>
</div>
{% endif %}

<div class="form-group">
<label class="col-sm-3 control-label optional-field">Other Social Media</label>
<div class="col-sm-6">
Expand Down
1 change: 1 addition & 0 deletions uber/templates/guest_checklist/guest_bio_deadline.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "guest_checklist/bio_deadline.html" %}

{% block deadline_headline %}Guest/Group Information{% endblock %}
{% block deadline_text %}
{% if guest.bio_status %}
Expand Down
1 change: 1 addition & 0 deletions uber/templates/guest_checklist/guest_panel_deadline.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{% extends "guest_checklist/panel_deadline.html" %}

{% block deadline_headline %}Add Your Panels{% endblock %}
Loading

0 comments on commit db703f4

Please sign in to comment.