65599

CSS Files not working on localhost

Question:

The problem is just happening on localhost, when I upload the application to AppEngine, It succesfully finds the css files.

I'm using python 2.7, the app is done on webapp2 and I'm using a local copy of bootstrap.

<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen"> <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

Those are my links to the css files, they work when I deploy the app <a href="http://main-cocoa-597.appspot.com/cenira" rel="nofollow">http://main-cocoa-597.appspot.com/cenira</a>, but they don't on localhost.

app.yaml

application: main-cocoa-597 version: 1 runtime: python27 api_version: 1 threadsafe: yes handlers: - url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico - url: /static static_dir: static - url: /cenira.* script: cenira.app - url: .* script: main.app libraries: - name: webapp2 version: "2.5.2" - name: jinja2 version: latest

I think the problem has nothing to do with the app, since even the launcher's SDK Console is not loading It's css files either.

<img alt="problem" class="b-lazy" data-src="https://i.stack.imgur.com/klc8M.jpg" data-original="https://i.stack.imgur.com/klc8M.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

I just installed Windows, maybe there's something missing? How can I solve this?

<strong>EDIT:</strong>

just with a basic html (a div with a class), and linking to an external css file:

<link href="/css/asd.css" rel="stylesheet">

getting this:

GET file:///C:/css/asd.css net::ERR_FILE_NOT_FOUND

Answer1:

For PIL, add this to the libraries section of app.yaml:

- name: PIL version: latest

To diagnose the 500 error in your css request, try adding this:

- url: /static/css static_dir: static/css mime_type = "text/css"

(This needs to be ABOVE your - url /static call, so it runs first

Recommend

  • (Responsive)Table Width does not fit the container inside iframe on ios safari
  • BackgroundMediaPlayer set Uri source of Media library item
  • how tensorflow worker driver training process and cause variables update on ps job?
  • Batching in py2neo
  • How to display the hotel names that have the maximum count from data base by calculating sum in PHP?
  • ResponseBuilder is not working when used with entity object
  • WP7 - read from CSV file? Or what to do with the data?
  • Is it possible to control programs with Javascript?
  • Is it possible to disable jQuery's mobile responsive design?
  • Changing the color of an image link on hover
  • Why are views not counted if you embed a youtube iframe dynamically using jquery?
  • NetBeans doesn't see style.css [duplicate]
  • Fluid video height
  • Jquery Show & ScrollTop (or ScrollTo)
  • Microsoft Chart Controls for Microsoft .NET Framework 4.0
  • Is mp4 stream able with ffserver?
  • How to add regEx in angular filter
  • Python/Javascript: WYSIWYG html editor - Handle large documents fast and/or design theory
  • IE10 strips out hashtag from the URL
  • Application level floating views with navigation in Android
  • AndEngine Applying Transparancy to AndEngine View
  • Using a canvas object in a thread to do simple animations - Java
  • Adjust width of select element according to selected option's width
  • Installing iPhone App to iPhone
  • azure media services - The request body is too large and exceeds the maximum permissible limit
  • Jquery UI tool tip close icon
  • Avoid links criss cross / overlap in d3.js using force layout
  • Launch Runnable Jar from Web Start
  • R: gsub and capture
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • bootstrap to use multiple ng-app
  • Comma separated Values
  • How to get icons for entities from eclipse?
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • How to load view controller without button in storyboard?