# HG changeset patch # User Jeff Hammel # Date 1388172263 28800 # Node ID 0bf52646061b8b1d633118693f471221bb23eff8 # Parent 1bcb72011872d29a491d6e595e70868398814c33 example/persona.html example/persona.py setup.py diff -r 1bcb72011872 -r 0bf52646061b example/persona.html --- a/example/persona.html Thu Dec 26 23:44:43 2013 -0800 +++ b/example/persona.html Fri Dec 27 11:24:23 2013 -0800 @@ -10,10 +10,42 @@ - +

Mozilla persona bitsyauth diff -r 1bcb72011872 -r 0bf52646061b example/persona.py --- a/example/persona.py Thu Dec 26 23:44:43 2013 -0800 +++ b/example/persona.py Fri Dec 27 11:24:23 2013 -0800 @@ -20,9 +20,14 @@ assert os.path.exists(self.page), "File '%s' not found" % self.page self.page = open(self.page, 'r').read() def __call__(self, environ, start_response): - start_response("200 OK", [('Content-Type', 'text/html'), - ('Content-Length', str(len(self.page)))]) - return [self.page] + method = environ['REQUEST_METHOD'] + if method == 'GET': + start_response("200 OK", [('Content-Type', 'text/html'), + ('Content-Length', str(len(self.page)))]) + body = self.page + elif method == 'POST': + body = '\n'.join([]) + return [body] def main(args=sys.argv[1:]): diff -r 1bcb72011872 -r 0bf52646061b setup.py --- a/setup.py Thu Dec 26 23:44:43 2013 -0800 +++ b/setup.py Fri Dec 27 11:24:23 2013 -0800 @@ -1,4 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup version = '0.1.2' @@ -13,7 +13,7 @@ author_email='k0scist@gmail.com', url='http://k0s.org/hg/bitsyauth', license='GPL', - packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + packages=['bitsyauth'], include_package_data=True, zip_safe=False, install_requires=['Paste', @@ -21,6 +21,7 @@ 'markup', # TO DEPRECATE 'skimpygimpy', 'PyBrowserID', + 'WebOb', ], dependency_links=[ 'http://svn.pythonpaste.org/Paste/trunk#egg=Paste',