appengine 

Send to Kindle
home » snippets » appengine


Pages
backend        
blobstore        
cloud_storage        
command_line        
datastore        
endpoints        
go        
hello_world        
hello_world2        
libraries        
protorpc        
remote_api        
search        
subdomains        
users        



More Stuff

Pipeline API for AppEngine

http://appengine-pipeline.googlecode.com/
http://mapreduce.appspot.com/
http://onebigfluke.com/

Adding in XSRF protection

From http://stackoverflow.com/questions/8384729/is-there-any-available-solution-to-provide-xsrf-csrf-support-for-google-app-engi/8545183#8545183
See also: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/

def init_csrf(self):
    """Issue and handle CSRF token as necessary"""

    self.csrf_token = self.request.cookies.get('c')
    if not self.csrf_token:
        self.csrf_token = str(uuid4())[:8]
        self.set_cookie('c', self.csrf_token)
    if self.request.method == 'POST' and self.csrf_protect \
        and self.csrf_token != self.request.get('_csrf_token'):
        raise CsrfException('Missing or invalid CSRF token.')