From 5613397dd4d11f11bceb31c611ba1ddddf5d94c2 Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Sun, 30 Nov 2014 13:15:03 +0000 Subject: [PATCH 1/2] Add explanation of pip freeze and shell redirection. Lots of our students got the impression that "pip freeze > filename" was the standard way of creating a file from the shell, which caused some really confusing problems later on! --- deploy/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/README.md b/deploy/README.md index f71969ab92a..4393920f68d 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -22,6 +22,8 @@ After the installation is finished, go to the `djangogirls` directory and run th This will create a file called `requirements.txt` with a list of your installed packages (i.e. Python libraries that you are using, for example Django :)). +> __Note__: `pip freeze` outputs a list of all the Python libraries installed in your virtualenv, and the `>` takes the output of `pip freeze` and puts it into a file. Try running `pip freeze` without the `> requirements.txt` to see what happens! + Open this file and add the following line at the bottom: psycopg2==2.5.3 From e2c7ee821e4998fd9923d33414bd3589c0e68c53 Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Sun, 30 Nov 2014 13:22:19 +0000 Subject: [PATCH 2/2] Make creation of "runtime.txt" more explicit. We had a surprising number of students who created runtime.txt with the `pip freeze > runtime.txt` method, and then added a Python version at the end. This caused endless confusion when Heroku told them that (Django==1.7.1 dj-database-url==0.3.0 waitress==0.8.9 whitenoise==1.0.5 psycopg2==2.5.3 python-3.4.2) was not a runtime supported by the cedar-14 stack - at one point we had five coaches standing around one poor student trying to work out what had gone wrong! I've tried to make it clearer that - you create runtime.txt using your editor - only the python version should be included in the file I've also removed the word "simply" from these instructions in line with the Coaching Guide. --- deploy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/README.md b/deploy/README.md index 4393920f68d..a7844bb50d6 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -44,7 +44,7 @@ Then save it. Done! ## The `runtime.txt` file -We need to tell Heroku which Python version we want to use. This is simply done by creating a `runtime.txt` and putting the following text inside: +We need to tell Heroku which Python version we want to use. This is done by creating a `runtime.txt` in the `djangogirls` directory using your editor's "new file" command, and putting the following text (and nothing else!) inside: python-3.4.2