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 8903751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:56:48+00:00 2026-06-15T01:56:48+00:00

I am a newborn baby programmer and have found I don’t understand a few

  • 0

I am a newborn baby programmer and have found I don’t understand a few things about GAE.

I have my app.yaml setup to route to separate apps

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

- url: /unit3.*
  script: unit3.app

- url: /birthday.*
  script: birthday.app

- url: /signup.*
  script: signup.app

- url: /rot13.*
  script: rot13.app

- url: .*
  script: main.app

and then inside signup.app – the WSGI redirects people to a welcome page after a simple post request

import webapp2
import jinja2
import os
import re

template_dir=os.path.join(os.path.dirname(__file__), 'templates')
jinja_env= jinja2.Environment(loader= jinja2.FileSystemLoader(template_dir), autoescape = True)

USER_RE = re.compile(r"^[a-zA-Z0-9_-]{3,20}$")
def valid_username(username):
    return username and USER_RE.match(username)

PASS_RE = re.compile(r"^.{3,20}$")
def valid_password(password):
    return password and PASS_RE.match(password)

EMAIL_RE  = re.compile(r'^[\S]+@[\S]+\.[\S]+$')
def valid_email(email):
    return not email or EMAIL_RE.match(email)

def render_str(template,**parms):
    t = jinja_env.get_template(template)
    return t.render(parms)

class  BaseHandler(webapp2.RequestHandler):
    """ a BaseHandler object to render and write  """
    def render(self, template, **kw):
        self.response.out.write(render_str(template, **kw))

    def write(self, *a, **kw):
        self.response.out.write(*a, **kw)


class SignUpHandler(BaseHandler):

    def get(self):
        self.render('signup.html')

    def post(self):
        have_error=False
        username=self.request.get('username')
        password=self.request.get('password')
        verify=self.request.get('verify')
        email=self.request.get('email')

        params = dict(username = username, 
                      email = email)

        if not valid_username(username):
            params['name_error']='that is not a valid name'
            have_error=True

        if not valid_password(password):
            params['password_error']=('that is not a valid password')
            have_error=True
        elif password != verify:
            params['verify_error']='your passwords dont match'
            have_error=True

        if not valid_email(email):
            params['email_error']='that is not a valid email address'
            have_error=True

        if have_error:
            params['message']=('Please type your info in again ' + username)
            self.render('signup.html', **params)
        else:
            self.redirect('welcome?username=' + str(username))

class WelcomeHandler(BaseHandler):

    def get(self):
        username = self.request.get('username')
        if valid_username(username):
            self.render('welcome.html', username = username)
        else:
            self.redirect('signup')


app = webapp2.WSGIApplication([('/signup',SignUpHandler),
                               ('/welcome',WelcomeHandler)]
                               ,debug=True)

Though the WelcomeHandler doesn’t find the templated html file, i get a 404.

Basically i get this 404 for anything routed via a RequestHandler.

I am pretty sure this is a basic misunderstanding that I have overlooked and can’t easily correct with a google search.

Do I need to router everything in the .yaml? Why is this not the case when i just have generic URL handler?

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

    You need to add the /welcome.* route to your app.yaml so it is served by signup.app.

    IN ADDITION, if I make a recommendation. You currently only support the routes /signup and /welcome in signup.app:

    app = webapp2.WSGIApplication([('/signup',SignUpHandler),
                                   ('/welcome',WelcomeHandler)]
                                   ,debug=True)
    

    but you are routing all of /signup.* in app.yaml. So if /signup/ will get sent to this WSGI handler and will result in a 404. Instead of doing this, either add explicit paths in app.yaml and a 404 handler in your catch-all in main.app or add a 404 handler catch-all in each submodule.

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

Sidebar

Related Questions

I've read some articles about async IO. But I don't understand the difference between
this is really simple but I am sleep deprived (newborn baby) and can't seem
I'm a newborn developer for iPad, I finally finished an app and I want
I am a newborn programmer who is currently looking into the Insert, Update and
I'm a new-born programmer so I am NOT experienced, nor do I understand all
I have two tables: AgeMilestones //Represents available timespans Id int Description varchar //(newborn, 1
Consider I have the following classes: class User { [Key] public Guid Id {get;
I have a task - add round corners to HtmlPanelGrid. Now I am trying
I have an entry I need to accept a person's date of birth in.
A newborn Perl developer here. I've been wracking my brain and searching all over

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.