Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break a couple inline multiline code strings onto multiple lines for readability #862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,19 @@ def request_token(request, client_id):
missing = True
sent = False
context = {'NO_FOOT': True, 'NO_NAV': True, 'NO_API': True,
'styles': "#main {\n\tbackground-color: white !important;\n\theight: 100vh;\n}\n.text-white {"
"\n\tcolor: black !important;\n}\n.help-block {\n\tdisplay: none;\n}"}
'styles': """
#main {
background-color: white !important;
height: 100vh;
}
.text-white {
color: black !important;
}
.help-block {
display: none;
}
"""
}

# Verify Client ID and retrieve corresponding application record
if not settings.CRYPTO_KEY:
Expand Down
12 changes: 9 additions & 3 deletions emails/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,15 @@ def generate_poke_cc_email_content(services, message):
else:
when = start.strftime("%A (%-m/%-d) %-I:%M %p to ") + end.strftime("%A (%-m/%-d) %-I:%M %p")
setup = timezone.localtime(event.datetime_setup_complete).strftime("%A (%-m/%-d) %-I:%M %p")
event_details += "<strong>CC's needed:</strong> %s\n<strong>Services:</strong> %s\n<strong>What:</strong> " \
"<a href='%s'>%s</a>\n<strong>When:</strong> %s\n<strong>Setup by:</strong> %s\n" \
"<strong>Where:</strong> %s\n<strong>Description:</strong> %s\n\n" % \
event_details += """<strong>CC's needed:</strong> %s
<strong>Services:</strong> %s
<strong>What:</strong> <a href='%s'>%s</a>
<strong>When:</strong> %s
<strong>Setup by:</strong> %s
<strong>Where:</strong> %s
<strong>Description:</strong> %s

""" % \
(ccs_needed, service_details, link, event.event_name, when, setup, event.location.name,
event.description)
body = message + "<hr>" + event_details
Expand Down
13 changes: 11 additions & 2 deletions events/views/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,17 @@ def checkin(request):
def checkout(request):
""" Event checkout page for crew members """
context = {'NO_FOOT': True, 'NO_NAV': True, 'NO_API': True, 'LIGHT_THEME': True,
'styles': ".control {\n\tpadding: .375rem .75rem;\n\tfont-size: 1rem;\n\tline-height: 1.5;\n\t"
"border-radius: .25rem;\n\tborder: 1px solid #cde4da;\n\tbackground-clip: padding-box;}"}
'styles': """
.control {
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: .25rem;
border: 1px solid #cde4da;
background-clip: padding-box;
}
"""
}

if not request.user.is_lnl:
raise PermissionDenied
Expand Down
12 changes: 10 additions & 2 deletions events/views/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,15 @@ def workshops(request):
'workshops': Workshop.objects.all(),
'title': "Workshops",
'description': "Learn more about out our upcoming sound and lighting workshops.",
'styles': "strong {\n\tcolor: orange;\n}\npre {\n\tfont-size: 1rem;\n\tcolor: white;\n\tfont-family: "
"Helvetica Neue, Helvetica, Arial, sans-serif;\n} "
'styles': """
strong {
color: orange;
}
pre {
font-size: 1rem;
color: white;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
"""
}
return render(request, 'workshops.html', context)
Loading