Scifabric / pybossa

PYBOSSA is the ultimate crowdsourcing framework (aka microtasking) to analyze or enrich data that can't be processed by machines alone.
http://pybossa.com
GNU Affero General Public License v3.0
745 stars 269 forks source link

Serve CSS, JS etc using a blueprint #189

Closed teleyinex closed 12 years ago

teleyinex commented 12 years ago

Problem: When you install the server in a place like: http://domain.com/pybossa the CSS and JS will fail to load because it will try to load it from the root folder. Solution: Use a blueprint to serve all the assets

rufuspollock commented 12 years ago

I'd suggest a simpler solution: just allow a config variable called e.g. site_url or similar and use that to prefix links to site assets. Also I thought if you use url_for style to get links to static it should take account of fact you are not on root domain.

teleyinex commented 12 years ago

The solution is even more simple, just url_for('static',filename='vendor/bootstrap/whatever.css|js') works! I'll not use the Blueprint for this :-)