Skip to content

Commit

Permalink
prepare compat for htag > 0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
manatlan authored Sep 22, 2023
1 parent 74fcf92 commit 3b89dd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/oauth_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def user(self): # -> dict or empty dict
return self._rootstate.get(OAUTH_SESSION_NAME,{})

def render(self): # dynamic rendering
self.clear()
self+= self.title + self.btn
if self.user:
self.title.set(self.user['name'])
Expand All @@ -83,6 +84,8 @@ def init(self):
self.oa = TagOAuth(self.state)

def render(self): # dynamic rendering
self.clear()

self += self.oa
self += f"You are {self.oa.user.get('name') or 'unknown'}"

Expand Down

0 comments on commit 3b89dd4

Please sign in to comment.