Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let's define our model and get our database connection set up. We'll also make our script executable so we can run it in a nicer manner.
New Terms
-
TextField()
- a field that holds a blob of text of any size -
DateTimeField()
- a field for holding a date and a time
/usr/bin/env
what?
If you're not sure what to put after /usr/bin/env
, test it out in your terminal program.
Type in /usr/bin/env python
and you should get a Python shell like normal. If it says 2.7 or something other than the 3.4 you should be expecting, try /usr/bin/env python3
. Whichever of these gets you the correct Python shell is the one you should put at the top of your file.
On Windows?
Here are the official docs on this. It should just work, but if it doesn't, I'm sure the official docs will help you troubleshoot it.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Anthony Grodowski
4,902 Points1 Answer
-
nakalkucing
12,964 Points/usr/bin/env: 'python3\r': No such file or directory But I followed Kenneth's code exactly!
Posted by nakalkucingnakalkucing
12,964 Points2 Answers
-
fc3
Python Web Development Techdegree Student 9,205 Points6 Answers
-
Iain Watson
3,031 PointsDiary.py
Posted by Iain WatsonIain Watson
3,031 Points1 Answer
-
Ashley Keeling
11,476 Points1 Answer
-
Pat McCarthy
9,800 Points2 Answers
-
Arcee Palabrica
8,100 Points1 Answer
-
Julian Gu
12,490 Points0 Answers
-
Konrad Hunter
3,629 Points1 Answer
-
Robust Tran
2,802 Points1 Answer
-
Jeffrey Covington
7,246 Points1 Answer
-
YiSzen Tang
2,221 PointsSqlite3
Posted by YiSzen TangYiSzen Tang
2,221 Points1 Answer
-
vikas pal
11,563 Points1 Answer
-
Jordan Featherstone
5,973 Points0 Answers
-
Kathryn Klarich
4,622 Points2 Answers
-
Kathryn Klarich
4,622 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up