Permalink
Browse files

Merge branch 'master' of https://github.com/agiliq/so-starving

  • Loading branch information...
2 parents 1044871 + 500275a commit cfccf0e1e66dcec5ea8bda9ce4f5dc9ef98795b7 @ericmoritz ericmoritz committed Nov 8, 2010
Showing with 140 additions and 355 deletions.
  1. +0 −4 pyramid/pyramid_minimal/CHANGES.txt
  2. +0 −4 pyramid/pyramid_minimal/README.txt
  3. +0 −28 pyramid/pyramid_minimal/development.ini
  4. +0 −25 pyramid/pyramid_minimal/pyramid_minimal.egg-info/PKG-INFO
  5. +0 −15 pyramid/pyramid_minimal/pyramid_minimal.egg-info/SOURCES.txt
  6. +0 −1 pyramid/pyramid_minimal/pyramid_minimal.egg-info/dependency_links.txt
  7. +0 −3 pyramid/pyramid_minimal/pyramid_minimal.egg-info/entry_points.txt
  8. +0 −1 pyramid/pyramid_minimal/pyramid_minimal.egg-info/not-zip-safe
  9. +0 −1 pyramid/pyramid_minimal/pyramid_minimal.egg-info/paster_plugins.txt
  10. +0 −3 pyramid/pyramid_minimal/pyramid_minimal.egg-info/requires.txt
  11. +0 −1 pyramid/pyramid_minimal/pyramid_minimal.egg-info/top_level.txt
  12. +0 −22 pyramid/pyramid_minimal/pyramid_minimal/__init__.py
  13. +0 −20 pyramid/pyramid_minimal/pyramid_minimal/handlers.py
  14. BIN pyramid/pyramid_minimal/pyramid_minimal/static/favicon.ico
  15. BIN pyramid/pyramid_minimal/pyramid_minimal/static/logo.png
  16. +0 −73 pyramid/pyramid_minimal/pyramid_minimal/static/pylons.css
  17. +0 −24 pyramid/pyramid_minimal/pyramid_minimal/subscribers.py
  18. +0 −24 pyramid/pyramid_minimal/pyramid_minimal/tests.py
  19. +0 −27 pyramid/pyramid_minimal/setup.cfg
  20. +0 −37 pyramid/pyramid_minimal/setup.py
  21. +0 −42 pyramid/pyramid_simple/templates/index.mako
  22. 0 pyramid/{pyramid_simple → }/run.py
  23. 0 pyramid/{pyramid_minimal/pyramid_minimal → }/templates/index.mako
  24. +31 −0 pyroutes/app.py
  25. +38 −0 pyroutes/base.xml
  26. +30 −0 tornado/app.py
  27. +41 −0 tornado/templates/index.html
@@ -1,4 +0,0 @@
-0.0
----
-
-- Initial version
@@ -1,4 +0,0 @@
-pyramid_minimal README
-
-
-
@@ -1,28 +0,0 @@
-[app:pyramid_minimal]
-use = egg:pyramid_minimal
-reload_templates = true
-mako.directories = pyramid_minimal:templates
-debug_authorization = false
-debug_notfound = false
-debug_templates = true
-default_locale_name = en
-session.type = file
-session.data_dir = %(here)s/data/sessions/data
-session.lock_dir = %(here)s/data/sessions/lock
-session.key = pyramid_minimal
-session.secret = your_app_secret_string
-cache.regions = default_term, second, short_term, long_term
-cache.type = memory
-cache.second.expire = 1
-cache.short_term.expire = 60
-cache.default_term.expire = 300
-cache.long_term.expire = 3600
-
-[pipeline:main]
-pipeline = egg:WebError#evalerror
- pyramid_minimal
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 6543
@@ -1,25 +0,0 @@
-Metadata-Version: 1.0
-Name: pyramid-minimal
-Version: 0.0
-Summary: pyramid_minimal
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: pyramid_minimal README
-
-
-
-
-
- 0.0
- ---
-
- - Initial version
-
-Keywords: web pylons
-Platform: UNKNOWN
-Classifier: Programming Language :: Python
-Classifier: Framework :: Pylons
-Classifier: Topic :: Internet :: WWW/HTTP
-Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
@@ -1,15 +0,0 @@
-README.txt
-setup.cfg
-setup.py
-pyramid_minimal/__init__.py
-pyramid_minimal/handlers.py
-pyramid_minimal/subscribers.py
-pyramid_minimal/tests.py
-pyramid_minimal.egg-info/PKG-INFO
-pyramid_minimal.egg-info/SOURCES.txt
-pyramid_minimal.egg-info/dependency_links.txt
-pyramid_minimal.egg-info/entry_points.txt
-pyramid_minimal.egg-info/not-zip-safe
-pyramid_minimal.egg-info/paster_plugins.txt
-pyramid_minimal.egg-info/requires.txt
-pyramid_minimal.egg-info/top_level.txt
@@ -1,3 +0,0 @@
- [paste.app_factory]
- main = pyramid_minimal:main
-
@@ -1,3 +0,0 @@
-pyramid
-pyramid_beaker
-WebError
@@ -1 +0,0 @@
-pyramid_minimal
@@ -1,22 +0,0 @@
-from pyramid_beaker import session_factory_from_settings
-
-from beaker.cache import cache_regions
-cache_regions['short_term'] = dict(type='memory', expire=30*60)
-
-def main(global_config, **settings):
- """ This function returns a Pyramid WSGI application.
- """
- from pyramid.configuration import Configurator
- config = Configurator(settings=settings)
- config.begin()
- session_factory = session_factory_from_settings(settings)
- config.set_session_factory(session_factory)
- config.add_static_view('static', 'pyramid_minimal:static/')
- config.add_handler('action', '/{action}', 'pyramid_minimal.handlers:MyHandler')
- config.add_handler('home', '/', 'pyramid_minimal.handlers:MyHandler',
- action='index')
- config.add_subscriber('pyramid_minimal.subscribers.add_renderer_globals',
- 'pyramid.events.BeforeRender')
- config.end()
- return config.make_wsgi_app()
-
@@ -1,20 +0,0 @@
-import urllib
-import json as simplejson
-
-from pyramid.view import action
-from beaker.cache import cache_region
-
-class MyHandler(object):
- def __init__(self, request):
- self.request = request
-
- @action(renderer='index.mako')
- def index(self):
- fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
-
- @cache_region('short_term')
- def fb_data(key=None):
- fb_response = urllib.urlopen(key,).read()
- return simplejson.loads(fb_response)["data"]
-
- return {'data': fb_data(fml_endpoint)}
Binary file not shown.
Deleted file not rendered
@@ -1,73 +0,0 @@
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;/* 16px */
-vertical-align:baseline;background:transparent;}
-body{line-height:1;}
-ol,ul{list-style:none;}
-blockquote,q{quotes:none;}
-blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
-:focus{outline:0;}
-/* remember to highlight inserts somehow! */
-ins{text-decoration:none;}
-del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
-table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
-sub{vertical-align:sub;font-size:smaller;line-height:normal;}
-sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
-ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
-ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
-li{display:list-item;}
-/* nested lists have no top/bottom margins */
-ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
-ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
-ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
-.hidden{display:none;}
-p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
-html,body{width:100%;height:100%;}
-body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
-a{color:#1b61d6;text-decoration:none;}
-a:hover{color:#e88f00;text-decoration:underline;}
-body h1,
-body h2,
-body h3,
-body h4,
-body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
-.wrapper{width:100%}
-#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
-.app-welcome{margin-top:25px;}
-.app-name{color:#000000;font-weight:bold;}
-.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
-.align-left{text-align:left;}
-.align-right{text-align:right;}
-.align-center{text-align:center;}
-ul.links{margin:0;padding:0;}
-ul.links li{list-style-type:none;font-size:14px;}
-form{border-style:none;}
-fieldset{border-style:none;}
-input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
-input[type=submit]{background-color:#ddd;font-weight:bold;}
-/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
@@ -1,24 +0,0 @@
-from pyramid.threadlocal import get_current_request
-from pyramid.exceptions import ConfigurationError
-from pyramid.url import route_url
-
-def add_renderer_globals(event):
- """ A subscriber to the ``pyramid.events.BeforeRender`` events. Updates
- the :term:`renderer globals` with values that are familiar to Pylons
- users."""
- request = event.get('request')
- if request is None:
- request = get_current_request()
- globs = {
- 'url': route_url,
- 'h':None,
- }
- if request is not None:
- tmpl_context = request.tmpl_context
- globs['c'] = tmpl_context
- globs['tmpl_context'] = tmpl_context
- try:
- globs['session'] = request.session
- except ConfigurationError:
- pass
- event.update(globs)
@@ -1,24 +0,0 @@
-import unittest
-
-from pyramid.configuration import Configurator
-
-class MyControllerTests(unittest.TestCase):
- def setUp(self):
- self.config = Configurator()
- self.config.begin()
-
- def tearDown(self):
- self.config.end()
-
- def _makeOne(self, request):
- from pyramid_minimal.handlers import MyHandler
- return MyHandler(request)
-
- def test_index(self):
- request = DummyRequest()
- controller = self._makeOne(request)
- info = controller.index()
- self.assertEqual(info['project'], 'pyramid_minimal')
-
-class DummyRequest(object):
- pass
@@ -1,27 +0,0 @@
-[nosetests]
-match=^test
-nocapture=1
-cover-package=pyramid_minimal
-with-coverage=1
-cover-erase=1
-
-[compile_catalog]
-directory = pyramid_minimal/locale
-domain = pyramid_minimal
-statistics = true
-
-[extract_messages]
-add_comments = TRANSLATORS:
-output_file = pyramid_minimal/locale/pyramid_minimal.pot
-width = 80
-
-[init_catalog]
-domain = pyramid_minimal
-input_file = pyramid_minimal/locale/pyramid_minimal.pot
-output_dir = pyramid_minimal/locale
-
-[update_catalog]
-domain = pyramid_minimal
-input_file = pyramid_minimal/locale/pyramid_minimal.pot
-output_dir = pyramid_minimal/locale
-previous = true
@@ -1,37 +0,0 @@
-import os
-
-from setuptools import setup, find_packages
-
-here = os.path.abspath(os.path.dirname(__file__))
-README = open(os.path.join(here, 'README.txt')).read()
-CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
-
-requires = ['pyramid', 'pyramid_beaker', 'WebError']
-
-setup(name='pyramid_minimal',
- version='0.0',
- description='pyramid_minimal',
- long_description=README + '\n\n' + CHANGES,
- classifiers=[
- "Programming Language :: Python",
- "Framework :: Pylons",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
- ],
- author='',
- author_email='',
- url='',
- keywords='web pylons',
- packages=find_packages(),
- include_package_data=True,
- zip_safe=False,
- install_requires=requires,
- tests_require=requires,
- test_suite="pyramid_minimal",
- entry_points = """\
- [paste.app_factory]
- main = pyramid_minimal:main
- """,
- paster_plugins=['pyramid'],
- )
-
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>FMl</title>
- <style>
- .author{
- font-style:italic;
- }
- li{
- list-style: none;
- }
- .picture, .message{
- float:left;
- }
- </style>
-</head>
-<body>
-
- % if data:
- <ul>
- % for post in data:
- % if 'message' in post:
- <li>
- <div>
- <div class="picture">
- <img src="https://graph.facebook.com/${ post['from']['id'] }/picture" />
-
- </div>
- <div class="message">
- ${ post['message'] } : <span class="author">${ post['from']['name'] }</span>
- </div>
-
- </div>
- </li>
- % endif
- % endfor
- </ul>
- % endif
-
-</body>
-</html>
File renamed without changes.
Oops, something went wrong.

0 comments on commit cfccf0e

Please sign in to comment.