コード例 #1
0
def search_character():
    character_name = request.form['name']
    characters = data.get_character(character_name)
    flash("Characters found!")
    return render_template("search_character.html", characters=characters)
コード例 #2
0
 def resolve_character(self, info, id):
     return get_character(id)
コード例 #3
0
 def resolve_friends(self, info):
     return [get_character(f) for f in self.friends]
コード例 #4
0
 def resolve_friends(self, info):
     # The character friends is a list of strings
     return [get_character(f) for f in self.friends_id]