2

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

1 Answer 1

1

Fixed it by adding the static directory into the flask app.conf <Directory /var/www/FlaskApp/Static/> Order allow,deny Allow from all </Directory>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.