Forums

Static files with web.py

[mod edit] This question is largely outdated since we released our static files support, which you'll find on the Web tab

Hi all,

I'm using web.py for building a small application on top of your platform (BTW, thanks!). However, I'm facing a problem while trying to access 'static' files via URL. I've created a 'static' folder in /var/www/ that normally should be available at http://geotux.pythonanywhere.com/static/ but it's not. Do you know how can I access my files from Internet?

Regards,

Germán

Our static file support isn't great right now; you have to serve them explicitly through your web application. We're actually working on a fix for this -- as part of a larger change that will also allow multiple web applications for paying users -- right now.

Which web framework are you using? If you tell me that, I can tell you how to set it up to deliver your static files until we've got the proper support done.

Thanks for the answer. I'm using web.py for the app.

I've found this solution [1], if you find it could be somehow improved please tell me.

Regards,

Germán

[1] https://groups.google.com/forum/#!msg/webpy/z5J532SLqYA/srCYvtJJRPEJ

Ah, sorry, I should have read the title instead of just the post! That looks like it will work for the time being, and hopefully we'll have proper built-in static file support soon.

@geotux: Welcome to PA. I hope you enjoy our community.

Thank you both, I didn't expect this kind of support.

Geotux,

I think it is fair to say that the level of support - both from the developers and from users such as carteroo and a2j - is absolutely amazing.

Aw, thanks rcs1000 :-)

Always happy to try and give a little back to the Python community wherever it's found.

Unfortunately at the moment "little" is the operative word, juggling a full-time job, a post-op recovering wife and a three-week old. She's already almost 12lbs too (no, not the wife), so juggling her is no mean feat, I can tell you...

(Yes of course that was a joke, no need to call child services)

But seriously, thanks for the mention. (^_^)

@Cartroo: I have a four year old and a two year...

Sometimes - to get time for development - I have to resort to creative solutions

https://www.dropbox.com/s/z5yqj2i93yaxlmk/programming.jpg

Now that's what I call pair programming!

I hope that's not Excel on the laptop screen, or we will have to call child services ;-)

No! I was (and still am) trying to build a unified controller for both Squeezeboxes and Sonos in Python. (To be controlled by a pretty QT ui).

(Not really a PA type project, although I may play with flask and knock up a web interface.)

To be fair, I find Excel to be the least irritating of the Office applications, and it's almost competent at what it was designed for - i.e. tabulating primarily numerical data.

The main issue is that large numbers of people seem to feel it's an appropriate tool for everything else...

@rcs1000: Excuse the delay in my response, but it took me this long to stop blushing...☺

Seriously thank-you for the mention. I sincerely appreciate it.

@rcs1000 Right. BTW, nice photo :)

First time one of my questions gets so much attention in a community.