Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
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 upRelated 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