3 ms·
cd is a command. It takes an argument, which is a path to a folder. It could be any folder; it's up to you. If you decide to make a folder in your home directo
by marssaxman 11y ago
cd is a command. It takes an argument, which is a path to a folder. It could be any folder; it's up to you.
If you decide to make a folder in your home directory which is named "floop", you would type this command:
$ cd floop
Now your shell is inside the floop folder, and everything you do until the next 'cd' command will happen relative to the contents of the floop folder.
- deleted 11y ago[deleted]
- CaiGengYang 11y agoOk , so I created a folder called "Weiqi" in my home directory. (named after the game I am best at!) Then I typed the command $ cd Weiqi in the "Terminal" CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd Weiqi --- input and got this output : CaiGengYangs-MacBook-Pro:Weiqi CaiGengYang$ --- output Then I ran the following command in the Terminal : $ django-admin startproject mysite. This created a mysite folder which appeared inside the original Weiqi folder in my home directory. When I clicked on the mysite folder, there is a manage.py file and another mysite folder inside the original mysite folder. When I click on the mysite folder, there are 4 files in it : __init__.py , settings.py , urls.py and wsgi.py. The next chapter of the tutorial says this : "Where should this code live? If your background is in plain old PHP (with no use of modern frameworks), you’re probably used to putting code under the Web server’s document root (in a place such as /var/www). With Django, you don’t do that. It’s not a good idea to put any of this Python code within your Web server’s document root, because it risks the possibility that people may be able to view your code over the Web. That’s not good for security. Put your code in some directory outside of the document root, such as /home/mycode." 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" ?