from scaffold.core.widget import base_widget class control(base_widget): oauth_enabled = set() def create(self): return self def enable_oauth(self, name): self.oauth_enabled.add(name) return self def render(self): htm = '
' htm += '

Please login with one of the oauth provider below, which is more secure and does not store passwords on our system.

' if self.oauth_enabled: htm += '
' if 'google' in self.oauth_enabled: htm += ' ' if 'facebook' in self.oauth_enabled: htm += 'Login with Facebook ' if 'github' in self.oauth_enabled: htm += 'Login with GitHub' htm += '
' htm += '

Or alternatively login with your previously created account.

' htm+= '''
Register for an account | Reset password''' htm += '
' return htm