This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"name~=": "Wikipedia", | |
"type": "/common/topic", | |
"/common/topic/webpage": | |
[{"uri":null, | |
"id" : null, | |
"topic": null, | |
"category": null}] | |
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.fbAsyncInit = function() { | |
FB.init({appId: '{{ facebook_app_id }}', status: true, cookie: true, xfbml: true}); | |
FB.Event.subscribe('{% if current_user %}auth.logout{% else %}auth.login{% endif %}', function(response) { | |
window.location.reload(); | |
}); | |
FB.Canvas.setAutoResize(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"code": "/api/status/ok", | |
"result": [{ | |
"attribution": [ | |
"/user/metaweb" | |
], | |
"creator": [ | |
"/user/metaweb" | |
], | |
"derivative_games": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"id": "/en/settlers_of_catan", | |
"/common/topic/weblink": [{ | |
"description": "BoardGameGeek", | |
"url": null | |
}] | |
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query = [{ | |
"type": "/games/game", | |
"id": None, | |
"name": None, | |
"!/award/award_honor/honored_for": { | |
"award": { | |
"id": "/en/spiel_des_jahres" | |
}, | |
"year": { | |
"value": None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#### | |
# 02/2006 Will Holcomb <[email protected]> | |
# | |
# This library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public | |
# License as published by the Free Software Foundation; either | |
# version 2.1 of the License, or (at your option) any later version. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext.webapp import template | |
from django import template as django_template | |
def in_list(value, arg): | |
""" | |
Given an item and a list, check if the item is in the list. | |
Usage: | |
{% if item|in_list:list %} | |
in list | |
{% else %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prefetch_refprops(entities, *props): | |
fields = [(entity, prop) for entity in entities for prop in props] | |
ref_keys = [prop.get_value_for_datastore(x) for x, prop in fields] | |
ref_entities = dict((x.key(), x) for x in db.get(set(ref_keys))) | |
for (entity, prop), ref_key in zip(fields, ref_keys): | |
prop.__set__(entity, ref_entities[ref_key]) | |
return entities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"cursor": true, | |
"id": null, | |
"type": "/games/game", | |
"mid": null, | |
"key": { | |
"namespace": "/user/pak21/boardgamegeek/boardgame", | |
"value": null, | |
"optional": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HIGH SCORES --> | |
<div class="block"> | |
<div class="score-block"> | |
<div class="block-header"> | |
<h2>High Scores</h2> | |
</div> | |
{% if high_scores %} | |
{% for s in high_scores %} | |
<div class="tiny-score"> | |
<div class="player"> |
OlderNewer