Reputation: 57
I have a simple flask app which uses a css style sheet. The app is being severed by an apache2 server running on a raspberry pi.
The main index html page shows but with no styling.
The set up is as follows: In the index.html i have
<link href="{{url_for('static', filename='main.css') }}" >
In the flask app i have
app.static_folder = 'static'
The folder structure is
/var/www/Flask/
/var/www/Flask/AlPiBanner/
/var/www/Flask/AlPiBanner/static
/var/www/Flask/AlPiBanner/templates
In the /var/www/Flask folder i have the wsgi file AlPiBanner.wsgi and ion the AlPiBanner folder the init.py file
I have searched the web and read several articles on this site that seem to indicate that it should work, so I'm not sure what I'm missing
any help would be appreciated.
cheers
Upvotes: 2
Views: 583
Reputation: 57
Fixed it by adding the static directory into the flask app.conf
<Directory /var/www/FlaskApp/Static/>
Order allow,deny
Allow from all
</Directory>
Upvotes: 1