My web app (halphillips.pythonanywhere.com) is a simple app that uses a button to update some text in a Google spreadsheet. I've just made some changes to my code, and I'm fairly certain that the changes themselves were made correctly (and will share the relevant portions below just in case). However, the web app seems to still be implementing the old version of the code. Is there something I need to do in order to deploy the changes?
I made the changes via the Python Anywhere web interface, i.e. https://www.pythonanywhere.com/user/halphillips/files/home/halphillips/bklynclay/bklynclay/bklynclay7.py?edit
Below is the relevant portion of the code, followed by a list of the changes I made.
CODE:
for index, row in df.iterrows():
shift_class = row['What type of coverage are you submitting?'].strip()
date = row['What date is being covered?']
name1 = row['What is the first and last name of the person who will be covering this shift / class?']
name2 = row['What is the first and last name of the person who normally covers this shift / teaches this class?']
class_foh_shift_tech_shift = row['What type of coverage are you submitting?']
start_time = row['What time does the covered shift/class begin?'].strftime("%I:%M %p")
end_time = row['What time does the covered shift/class end?'].strftime("%I:%M %p")
location = row['At which BKLYN CLAY location does your shift take place?']
if shift_class == 'Teaching a class':
class_foh_shift_tech_shift = 'class'
elif shift_class == 'Front of House':
class_foh_shift_tech_shift = 'front of house shift'
elif shift_class == 'Tech':
class_foh_shift_tech_shift = 'tech shift'
message = f"BKLYN CLAY {shift_class} Coverage {date}\n\n"
message += f"Hi there - This email is to confirm that {name1} will be covering {name2}'s {class_foh_shift_tech_shift} on {date} "
message += f"from {start_time} to {end_time} at {location}.\n\n"
message += "If the above contains any errors or is not what you agreed to, please reach out immediately so that we can revise the schedule.\n\n"
message += "Best,\n"
message += "The BKLYN CLAY team"
messages.append(message)
CHANGES I MADE:
- I added the entirety of the if/elif portion.
- I added the two instances of the .strftime method (which I'm not positive I did correctly, but that alone wouldn't have messed up the elif portion).
- I added the .strip method just in case the problem was whitespace (it wasn't).