Forums

Folder of publication

Hi friends!

I need understand what is my folder of publication for the site.

example: http://souwill.pythonanywhere.com/

I working with the structure above.

~$ /home/souwill

Thanks friends!

I'm not exactly sure what you mean by "folder of publication", so I'll just give you a brief overview of how things are set up on PythonAnywhere:

All requests to the domain souwill.pythonanywhere.com are routed to a file in your storage area (/var/www/wsgi.py) this then executes the code that you have specified. We provide some quick starts on the 'Web' tab of your dashboard to set it up for you.

There's also lots of stuff on the forums and on StackOverflow about what to put in wsgi.py for specific uses like virtualenvs and so on.

At the moment, all static files also need to be routed through you web code, but we're working on changing that so you can specify where to get static files from.

That does raise the question. If we add sub folders/files to /var/www are those folders/files accessible from the public if we say. made a folder named new and a file named runme.py...would the url http://myname.pythonanywhere.com/new/runme.py work?

I suppose I should have just tried it versus asking...:)

But, now that I asked...I'll wait for a response. That way everyone will know the answer and any caveats you share as well.

Then I'll respond :-) No, files in /var/www and its subdirectories aren't automatically made available to the public.

But making it easy to support static files is something we've done a lot of work on recently, and if all goes well then we should be able to release something soon! No promises, though...

thanks friends! I now understand the configurations and the system!

Very good!

Great!