"NameError: name 'self' is not defined"
<p>I'm sure it has to do with with tabs/spaces, but the $1 million question is where in the program???</p>

<pre><code>import webapp2

form="""
&lt;form method="post"&gt;
    What is your birthday?
    &lt;br&gt;

    &lt;label&gt; Month
    &lt;input type="text" name="month"&gt;
    &lt;/label&gt;

    &lt;label&gt; Day
    &lt;input type="text" name="day"&gt;
    &lt;/label&gt;

    &lt;label&gt; Year
    &lt;input type="text" name="year"&gt;
    &lt;/label&gt;
    &lt;div style="color: red"&gt;%s(error)s&lt;/div&gt;
    &lt;br&gt;
    &lt;br&gt;
    &lt;input type="submit"&gt;
&lt;/form&gt;
"""
months = ['January', 'Febuary','March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
mapping = dict((m[:3].lower(), m) for m in months)

def valid_month(month):
    if month:
        s_month = month[:3].lower()
        return mapping.get(s_month)

def valid_day(day):
    if day and day.isdigit():
        day = int(day)
        if day in range(1, 32):
            return day

def valid_year(year):
    if year and year.isdigit(): 
        int_year = int(year)
        if int_year in range(1900,2021): 
            return year

class MainPage(webapp2.RequestHandler):
    def write_form(self, error=""):
        self.response.out.write(form % {"error": error})

    def get(self):
        self.write_form()

    def post(self):
        user_month = valid_month(self.request.get('month'))
        user_day = valid_day(self.request.get('day'))
        user_year = valid_year(self.request.get('year'))

        if not (user_month and user_day and user_year):
            self.write_form("That's wasn't valid, friend!")
        else:
            self.response.write("Thanks! That's a totally valid day!")

app = webapp2.WSGIApplication([('/', MainPage)], debug=True)            
</code></pre>
