def get(self):
        user = users.get_current_user()
        assert user is not None, 'no current user!'

        urls = model.getLinks(user)
        template_values = {'urls' : urls}

        path = os.path.join(os.path.join(os.path.dirname(__file__), 'static'), 'links.html')
        self.response.out.write(template.render(path, template_values))
    def get(self):
        user = users.get_current_user()
        assert user is not None, 'no current user!'

        urls = model.getLinks(user)

        self.response.headers['Content-Type'] = 'application/json'
        respJSON = toJson(urls)
        self.response.out.write(respJSON)