# Path: mainhandler.py
# class Handler(webapp2.RequestHandler):
#     def write(self, *a, **kw):
#         self.response.out.write(*a, **kw)
# 
#     def render_str(self, template, **params):
#         t = jinja_env.get_template(template)
#         return t.render(params)
# 
#     def render(self, template, **kw):
#         self.write(self.render_str(template, **kw))
# 
#     def render_front(self, template):
#         self.render(template)
# 
# Path: app/utilities/utils.py
# def get_gist_data(gist_id, gist_filename):
#     gist_data = urlfetch.fetch("https://gist.github.com/sagarsane/" + gist_id + "/raw/" + gist_filename + ".json").content
#     gist_data = json.loads(gist_data)                 
#     return gist_data


import json
from mainhandler import Handler
from ..utilities.utils import get_gist_data


class Contact(Handler):
    def get(self):
        self.response.headers['Content-Type'] = 'application/json'

# Path: mainhandler.py
# class Handler(webapp2.RequestHandler):
#     def write(self, *a, **kw):
#         self.response.out.write(*a, **kw)
# 
#     def render_str(self, template, **params):
#         t = jinja_env.get_template(template)
#         return t.render(params)
# 
#     def render(self, template, **kw):
#         self.write(self.render_str(template, **kw))
# 
#     def render_front(self, template):
#         self.render(template)
# 
# Path: app/utilities/utils.py
# def get_gist_data(gist_id, gist_filename):
#     gist_data = urlfetch.fetch("https://gist.github.com/sagarsane/" + gist_id + "/raw/" + gist_filename + ".json").content
#     gist_data = json.loads(gist_data)                 
#     return gist_data


# Path: app/content/contact.py
import json
from mainhandler import Handler
from ..utilities.utils import get_gist_data



class Contact(Handler):
    def get(self):
        self.response.headers['Content-Type'] = 'application/json'

        self.write(json.dumps(get_gist_data('3785786','contact_data')))