LarsVegas
LarsVegas

Reputation: 6832

GAE: Why is my css not found?

With this configuration I get a HTTP 500 error.

application: xxx
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /style
  static_dir: style


- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: /admin/.*
  script: google.appengine.ext.admin.application
  login: admin


- url: .*
  script: main.app


libraries:
- name: webapp2
  version: "2.5.2"

builtins:
- remote_api: on

My log says this though:

INFO     2013-04-16 12:11:28,356 server.py:561] default: "GET /style/pimp_soef.css   HTTP/1.1" 500 2168

And this is my HTML:

<link type="text/css" rel="stylesheet" href="/style/pimp_soef.css" />

What am I missing? Thanks in advance!

EDIT

What about my mainHandler? Something to do with that!?

app = webapp2.WSGIApplication([
    ('/', MainHandler),
], debug=True)

Upvotes: 1

Views: 118

Answers (1)

dragonx
dragonx

Reputation: 15143

Try typing the URL to the css file directly into the URL bar, that'll let you be sure the problem is not with your HTML.

Your code looks correct.

My guess is that it's something else. A typo in the filename. Maybe you have a capital letter. Or your directory structure is not set up so that /style can be found. Maybe file permissions.

Upvotes: 1

Related Questions