split gamecard into its own app, add models to teamsnap for custom fields (images)

This commit is contained in:
2022-06-09 07:46:53 -05:00
parent aa897f6f49
commit abdab2d30b
56 changed files with 273 additions and 58 deletions

View File

@@ -0,0 +1,14 @@
import pyteamsnap
def get_teamsnap_client(request):
request.user.socialaccount_set.filter(provider="teamsnap").first()
current_teamsnap_user = request.user.socialaccount_set.filter(
provider="teamsnap"
).first()
ts_token = (
current_teamsnap_user.socialtoken_set.order_by("-expires_at").first().token
)
return pyteamsnap.api.TeamSnap(token=ts_token)