Today was an important milestone – I finally deployed the app to Heroku and today’s standup meeting was logged using the app. Emails went out to both developers and non-developers and it was beautiful to see the app working so smoothly.

But of course the deployment didn’t go without hiccups. I was trying to deploy it using gunicorn and by following the official flask documentation on deploying to gunicorn, my Procfile was supposed to be

web: gunicorn nillu:app

But even after many combinations I couldn’t get it to work as gunicorn kept complaining about not able to import

Finally I had to create a file which had these lines:

from nillu import app as application

if __name__ == '__main__':

And my Procfile had just

web: gunicorn wsgi

This is the combination that worked.

When I received the emails today morning, I noticed that the user names were sorted in a different order than the /entry/ page. I wanted to maintain an alphabetical order for the names and managed to do it in the templates by sending a user order variable.

For the emails I used the default random ordering of the dict which caused this inconsistency. I had to pass the same user order to the email template generation program and the bug was fixed.

But I did find a few more bugs like if I don’t fill in any entry for a user, it still creates three empty entry rows. This should not happen. And the email should also not include users with empty entries. I will try to fix it later maybe.

But tomorrow I do want to beautify the entries a little bit by allowing markdown text (a subset of markdown).