Skip to content

Instantly share code, notes, and snippets.

@garindra
Last active August 29, 2015 13:57
Show Gist options
  • Save garindra/9370152 to your computer and use it in GitHub Desktop.
Save garindra/9370152 to your computer and use it in GitHub Desktop.
import weblet.component
class UserNameComponent(weblet.component.Component):
def __init__(self):
self.user_id = 42
def fetch(self):
return [
models.UserNameModel(self.user_id)
]
def render(self):
return """
<div>
<a href="#">My username</a>
</div>
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment