I attempted to add a CSS file as a static file in my project just to experiment with how it functions, but encountered difficulties right from the start.
The content of the CSS file is:
body {
background:#00FF00;
}
In addition, here is my configuration in the app.yaml file:
application: s~my_app_id
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /.*
script: main.app
- url: /remote_api
script: google.appengine.ext.remote_api.handler.application
login: admin
libraries:
- name: webapp2
version: 2.5.1
- name: jinja2
version: latest
builtins:
- remote_api: on
The CSS file does not seem to be applied either locally or after deployment. Here is the content of my page in main.py:
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheets/main.css"/>
</head>
<body>
some stuff
</body>
</html>
This is what the page looks like in the browser:
<html>
<head>
<style type="text/css"></style>
</head>
<body>
some stuff
</body>
</html>
Despite not seeing any errors or logs, everything seems to be functioning properly. I have tested this in both Chrome and IE10 browsers.