for your case, site1 and site2 are two isolate webserver, correct? Will all the files under both of these directories open to public once the server is up and running? Is the article from the tutorial suggest to have .py files store in some other place to avoid it being see by visitors online? So the framework could just import scripts from designated place through PYTHONPATH even when the scripts are not placed within site1 or site2?
Thank you for such a quick response especially to my extremely novice question. I hope I would learn a lot from this community, thank you very much Lachlan Musicman於 2016年4月27日星期三 UTC-7下午6時57分26秒寫道: > > Mie, > > Traditionally the document root to your webserver is (depending on your > system) /var/www. > > This will be defined in the webserver (apache2/httpd, nginx, etc) > configuration. > > I normally create a folder in my home dir called www and place my sites > within that > > /home/lachlan/www/site1 > /home/lachlan/www/site2 > > At a later point, you will need to set up your webserver to read from that > directory. > > > > Cheers > L. > > ------ > The most dangerous phrase in the language is, "We've always done it this > way." > > - Grace Hopper > > On 28 April 2016 at 11:25, Mie Rex <[email protected] <javascript:>> > wrote: > >> Hello everyone, I am new to Django and quite new to Python as well. >> >> I came across this advice while I'm going through the Django tutorial here >> https://docs.djangoproject.com/en/1.9/intro/tutorial01/ >> >> It mentioned "It’s not a good idea to put any of this Python code within >> your Web server’s document root..." >> My very newbie question is: what's document root of web server? >> I have no knowledge in building a web site so please forgive my very >> shallow question. >> Cheers >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/0d8833ce-1623-4811-836a-d82a1cc39ee9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/0d8833ce-1623-4811-836a-d82a1cc39ee9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f33413c-5f4c-42c3-9d87-b4ac494f6508%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

