Django (Python Web Framework) Tutorial

Cai Gengyang gengyangcai at
Sun Sep 27 06:12:21 CEST 2015

On Sunday, September 27, 2015 at 11:46:13 AM UTC+8, John Gordon wrote:
> In <1421a34f-d8cc-4367-adab-2c2b46504d72 at> Cai Gengyang <gengyangcai at> writes:
> > Question : I am a little confused about the last paragraph : What exactly
> > is a "directory outside of the document root, such as /home/mycode." and
> > how do you "Put your code in this directory" ?
> Django is a web application framework.  So, you have to use it together with
> a web server.  The "document root" is the directory where the web server
> expects to find files to be served as web pages.
> You said you put the Django project code in a subdirectory of your home
> directory.  That should be fine.
> -- 
> John Gordon                   A is for Amy, who fell down the stairs
> gordon at              B is for Basil, assaulted by bears
>                                 -- Edward Gorey, "The Gashlycrumb Tinies"


As for the next chapter(Database setup), I opened up mysite/ as per the instructions on the Django tutorial.

However, when I try to run the following command : $ python migrate to create the tables in the database,

CaiGengYangs-MacBook-Pro:Weiqi CaiGengYang$ python migrate ---- input

I get the following error message :

/Library/Frameworks/Python.framework/Versions/2.7/Resources/ can't open file '': [Errno 2] No such file or directory ---- output

Any idea how to solve this issue?

Thanks a lot !


More information about the Python-list mailing list