Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7924723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:53:34+00:00 2026-06-03T17:53:34+00:00

I trying to learn web application development. I’m currently using Google App Engine to

  • 0

I trying to learn web application development. I’m currently using Google App Engine to create apps. I was experimenting with showing images on my site but the site just shows the alternate text.

The first time I tried this I didn’t know about static files. Once I fixed that problem the request line for the image showed: ‘”GET /images/pic.jpg HTTP/1.1″ 200 -‘. When I ran dev_appserver it showed a warning saying I needed the python module “PIL” to do imaging. Once I downloaded and installed that the warning disappeared but it still won’t load the picture! The request line still shows that it found the image. But all the site displays is the alternate text!

Anyway, here’s the code for the app.yaml and script:
(note: I’m using the code for python 2.5)

———–app.yaml————

application: mysite
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: myscript.py

- url: /images
  static_dir: images

———- script ———–

template = """
        <body>
                <br>
                <br>
                <img src="/images/pic.jpg" alt="Clone Pic" width="100", height="70"/><br>
        </body>
"""
print "Content-Type: text/html"
print template

Here’s what my application directory looks like:

Root

   app.yaml

   script.py

   images

      pic.jpg

I recently found out that even if I change the name of the images directory in my script

<img src="/foo/pic.jpg...)

the request line still says its OK

"GET /foo/pic.jpg HTTP/1.1" 200 -

Anybody know what’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:53:43+00:00Added an answer on June 3, 2026 at 5:53 pm

    The order of your handlers matter. /.* matches every URI, hence you typically want that at the end. Try the following …

    handlers:
    - url: /images
      static_dir: images
    
    - url: /.*
      script: myscript.py
    

    Also, make sure your image files are under the directory images as you specified in static_dir.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn how to develop a j2ee web application but is currently
I'm trying to learn how to create dynamic websites using Glassfish (a Java application
I'm trying to learn Html5-based web application development on android OS. But what confuses
I'm currently building a web application using Google Maps. Unfortunately, I've reached the absolute
I'm trying to learn web development in Java and, from what I have seen
Appreciate some guidance - I'm trying to learn how to build HTML5 web-apps with
Firstly, I should say I'm completely new to Pylons, trying to learn web development
I am an experienced Java developer who is trying to learn web development with
I am starting a new project trying to create a web application for an
Im trying to learn how to set up a Zend framework web application from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.