Permalink
Browse files

Added website updates

  • Loading branch information...
jenikm committed Nov 1, 2011
1 parent 373a715 commit 5d1642c97a0a622fa30a66ea011809844f718594
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -59,14 +59,28 @@ def get(self):
class Search(webapp.RequestHandler):
def get(self):
city_name = self.request.get("city_name")
+ shape_id = self.request.get("shape_id")
cities = City.all().filter("name = ", city_name.lower().capitalize()).fetch(limit=10)
sightings = []
if len(cities) > 0:
sightings = Sighting.all().filter("city_id IN ", map((lambda x: x.city_id), cities)).fetch(limit=100)
+ if len(shape_id) > 0:
+ sightings = Sighting.all().filter("shape_id = ", int(shape_id)).fetch(limit=100)
template_values = {'current_page': 'search', 'sightings': sightings, 'city_name': city_name }
path = os.path.join(os.path.dirname(__file__), views_path + 'search.html')
self.response.out.write(template.render(path, template_values))
+class DataExtraction(webapp.RequestHandler):
+ def get(self):
+ template_values = {'current_page': 'data_extraction'}
+ path = os.path.join(os.path.dirname(__file__), views_path + 'data_extraction.html')
+ self.response.out.write(template.render(path, template_values))
+
+class Observations(webapp.RequestHandler):
+ def get(self):
+ template_values = {'current_page': 'observations'}
+ path = os.path.join(os.path.dirname(__file__), views_path + 'observations.html')
+ self.response.out.write(template.render(path, template_values))
class Sightings(webapp.RequestHandler):
def get(self):
@@ -82,6 +96,8 @@ def get(self):
('/sightings', Sightings),
('/screenshots', Screenshots),
('/search', Search),
+ ('/data_extraction', DataExtraction),
+ ('/observations', Observations),
('/download', Download)],
debug=True)
Oops, something went wrong.

0 comments on commit 5d1642c

Please sign in to comment.