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

  • SEARCH
  • Home
  • 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 8598501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:09:54+00:00 2026-06-12T01:09:54+00:00

my app.yaml : handlers: – url: /static static_dir: static – url: /.* script: main.app

  • 0

my app.yaml:

handlers:
  - url: /static
    static_dir: static

  - url: /.*
    script: main.app

is there a way, inside my webapp2 code, to get the absolute URL of the /static route?

  • 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-12T01:09:56+00:00Added an answer on June 12, 2026 at 1:09 am

    When you define routes in your application you can compute an uri. See: http://webapp-improved.appspot.com/guide/routing.html#building-uris
    With this information and your knowledge of the app.yaml you can compute the uri for the static url.

    In your main.app you add a dummy route definition for static. It will only be used to build the uri and it will never be used for routing.

    Modified example from the webapp2 docs :

    app = webapp2.WSGIApplication([
        webapp2.Route('/', handler='HomeHandler', name='home'),
        webapp2.Route('/static', handler=HomeHandler, name='static'), # never used for routing
    ])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app.yaml file I have: handlers: - url: /resume static_dir: resume Inside my
Here is a portion of my app.yaml file: handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
app.yaml application: cloudymovie version: 1 runtime: java welcome_files: - test.jsp handlers: - url: /test/*
I have the following defined in my app.yaml: handlers: - url: /favicon.ico static_files: img/favicon.ico
I have the following in my app.yaml (python is used): handlers: - url: /ico/
How do I configure the app.yaml file to redirect all URLs to another URL?
I've got a tiny bit of code to display a file in app.yaml -
Are there ways to test my error_handlers setup in the app.yaml file, especially the
In the app.yaml file of my Google App Engine project there is a skip_files
I need help with my app.yaml and url management. I have the scripts ting.py

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.