Forums

sample using wsgi

default wsgi script shows simple html page; I want to add some links to other pages and cannot understand where to put this pages (on main page a href=/...??)

Hi there,

If I understand you correctly, you want to serve some 'static' html pages straight from somewhere in your home folder. Unfortunately this is currently not possible by default (although we're working on it)

But, most web frameworks have some kind of support for static files. Flask is probably the simplest. Go to your Web tab, hit Replace with a new Web App, then use the New Flask App quickstart button.

That should put a new app in a folder called "mysite" for you. If you go to that folder in the Files tab, then create a **new directory"" called static. Now, any files you put in that folder are available via the /static/ url.

So, for example, if you put a file called test.html inside /home/kernie_xvid/mysite/static/test.html, then you can reach it via http://kernie_xvid.pythonanywhere.com/static/test.html.

Does that help?