Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added 'Where should this code live?' section to tutorial01

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0c6653cf0397423b089b9c0b68c659889316ae00 1 parent 6c6feb4
@adrianholovaty adrianholovaty authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 docs/tutorial01.txt
View
12 docs/tutorial01.txt
@@ -32,6 +32,18 @@ its setup.py utility. If it's not on your path, you can find it in
``site-packages/django/bin``; consider symlinking to it from some place
on your path, such as /usr/local/bin.)
+.. admonition:: Where should this code live?
+
+ If your background is in PHP, 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``.
+
A project is a collection of settings for an instance of Django -- including
database configuration, Django-specific options and application-specific
settings. Let's look at what ``startproject`` created::
Please sign in to comment.
Something went wrong with that request. Please try again.