Permalink
Browse files

REmoved PyCharm thingies, moved appengine stuf to nits own directory

  • Loading branch information...
1 parent 92de8d8 commit 5771ae86e94df8326f5282ba33f6f4c9c9207135 @shabda shabda committed Nov 7, 2010
View
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="PYTHON_MODULE" version="4">
- <component name="FacetManager">
- <facet type="google-appengine-python" name="Google App Engine">
- <configuration>
- <option name="rootFolder" value="$MODULE_DIR$" />
- <option name="sdkFolder" value="$USER_HOME$/pycharm/google_appengine" />
- <option name="templatesFolder" value="$MODULE_DIR$/templates" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager">
- <content url="file://$MODULE_DIR$" />
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Google App Engine SDK" level="project" />
- </component>
-</module>
-
View
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
-</project>
-
@@ -1,9 +0,0 @@
-<component name="libraryTable">
- <library name="Google App Engine SDK">
- <CLASSES>
- <root url="file://$USER_HOME$/pycharm/google_appengine" />
- <root url="file://$USER_HOME$/pycharm/google_appengine/lib/django" />
- </CLASSES>
- <SOURCES />
- </library>
-</component>
View
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="DependencyValidationManager">
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="ProjectResources">
- <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
- </component>
- <component name="ProjectRootManager" version="2" project-jdk-name="Python 2.6.6 (/usr/bin/python)" project-jdk-type="Python SDK" />
-</project>
-
View
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/.idea/FML.iml" filepath="$PROJECT_DIR$/.idea/FML.iml" />
- </modules>
- </component>
-</project>
-
View
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="VcsDirectoryMappings">
- <mapping directory="" vcs="" />
- </component>
-</project>
-
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,8 @@
+application: fml
+version: 1
+runtime: python
+api_version: 1
+
+handlers:
+- url: .*
+ script: main.py
View
@@ -0,0 +1,29 @@
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import util
+from google.appengine.ext.webapp import template
+from google.appengine.api import memcache
+
+import urllib
+import json as simplejson
+
+class MainHandler(webapp.RequestHandler):
+ def get(self):
+ fml_endpoint = 'http://graph.facebook.com/search?q="so%20starving&type=post'
+ fb_data = memcache.get(key = fml_endpoint)
+ if not fb_data:
+ fb_response = urllib.urlopen(fml_endpoint,).read()
+ fb_data = simplejson.loads(fb_response)["data"]
+ memcache.add(key = fml_endpoint, value = fb_data, time = 30 * 60)
+ self.response.out.write(template.render("templates/fml/index.html", {"data":fb_data}))
+
+ #self.response.out.write('Hello world!')
+
+
+def main():
+ application = webapp.WSGIApplication([('/', MainHandler)],
+ debug=True)
+ util.run_wsgi_app(application)
+
+
+if __name__ == '__main__':
+ main()
@@ -0,0 +1,41 @@
+<!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>
+
+
+ <ul>
+ {% for post in data %}
+ <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>
+ {% endfor %}
+ </ul>
+
+
+</body>
+</html>

0 comments on commit 5771ae8

Please sign in to comment.