Skip to content

Instantly share code, notes, and snippets.

View emilepetrone's full-sized avatar
🏠
Working from home

Emile Petrone emilepetrone

🏠
Working from home
View GitHub Profile
<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
{% for greeting in greetings %}
{% if greeting.author %}
<b>{{ greeting.author.nickname }}</b> wrote:
{% else %}
An anonymous person wrote:
import cgi
import os
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.ext.webapp import template
class Greeting(db.Model):
import sys
print 'Content-Type: text/html'
print ''
print '<pre>'
# Read the form input which is a single line
# guess=25
guess = -1
import pickle
f = open('/banner.p', 'r')
output = pickle.load(f)
print output
<div id="pd_rating_holder_2476225"></div>
<script type="text/javascript">
PDRTJS_settings_2476225 = {
"id" : "2476225",
"unique_id" : "default",
"title" : "",
"permalink" : ""
};
</script>
<script type="text/javascript" src="http://i.polldaddy.com/ratings/rating.js"></script>
def doRender(handler, tname='base/index.html', values={}):
temp = os.path.join(
os.path.dirname(__file__),
'templates/' + tname)
if not os.path.isfile(temp):
return False
#Make a copy of the dictionary
newval = dict(values)
newval['path'] = handler.request.path
def doRender(handler, tname='base/index.html', values={}):
temp = os.path.join(
os.path.dirname(__file__),
'templates/' + tname)
if not os.path.isfile(temp):
return False
outstr = template.render(temp)
handler.response.out.write(outstr)
return True
import logging
logging.info('Checking account='+acct)
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
{% extends "base/_base.html" %}
{% block maincontent %}
<h1>New URL Request</h1>
<b><i>{% if error %}
<p>
ERROR : {{ error }}
</p>