Week 6

Finishing the Blog

Lior Hirschfeld

I spent this week upgrading the Django infrastructure I had developed last week into a fully functional blog. Instead of starting from scratch, I found a theme called “Future Imperfect,” which can be found here: https://html5up.net/future-imperfect. However, after I copy-pasted the code from this theme into my Django template, there was still a significant amount of work to be done. The first thing I worked on was removing excess: I got rid of the list of micro posts on the sidebar, references to social media accounts, as well as the search functionality (as I only expect for this site to have roughly ten posts). After I finished that, I began to replace each of the stock photos that came with the theme with some photographs I took over the summer. Finally, after the base structure of the page was completed, I started implementing Django functionality to have the blog page get data from each of my past posts instead of displaying static data every time. 

Now that I had a fully functional blog on my computer, the next step was to deploy it to the web. I chose to use a service called “Heroku,” because it has built in integration with Python apps (and Django specifically), and it has a free plan with a number of features. Deploying to Heroku required installing a number of Django related Python packages on my local machine and creating a few reference files so that Heroku could understand how to run my script (for example, Heroku needs a “requirements.txt”, which is a list of all Python packages needed for app to work properly). To store media images (images uploaded by users as part of blog posts and that are not part of the static site), I needed to use a service provided by Amazon called S3. This required installing a few more packages, updating my settings.py file in Django, and creating an Amazon Web Services account, but was a relatively easy process.