Forums

django 1.8 code outside of document root

Hi,

django noob here, and also pythonanywhere noob....

Installed django 1.8.4 in a pythonanywhere virtualenv, and now going through the django 1.8 documentation. Hitting an issue pretty quickly with the django recommendation as to where the code should go:

"Put your code in some directory outside of the document root, such as /home/mycode."

when I try to use mkdir from the /home directory I don't have permission (for example):

(myvirtualenv)21:11 /home $ chmod -R 777 . chmod: changing permissions of ‘.’: Operation not permitted

And I don't have sudo available.

Is there a way to set up a /home/mycode directory?

Thanks.

You should be in /home/yourusername/, not /home directly. I assume it's /home/ydnayabe/

So go there, and try making your dir inside that.

Hey, ydnayabe. You are not allowed to create a subdirectory in /home/.

You should put your code in /home/ydnayabe/mycode, as robertlagrant suggested.