User Plugin¶
User plugins can extend the functionality of Cantemo users.
IUserProfileForm¶
- class portal.generic.plugin_interfaces.IUserProfileForm¶
Allows for extending UserProfile and saving into custom places.
- Args:
user - UserInstance
- Return:
dictionary with user instance:
return {'default_share_time': forms.ChoiceField( label="Default Share timeout", choices=[(8, "8 Hours"),(16, "16 Hours"),(24, "24 Hours")])}
IUserProfileSaveForm¶
- class portal.generic.plugin_interfaces.IUserProfileSaveForm¶
Allows saving from the Form whilst save is being called on it..
- Args:
form - A form instance that is about to be saved.
- Return:
True
IHomepage¶
- class portal.generic.plugin_interfaces.IHomepage¶
Allows the making choice of where a user should be redirected.
def __call__(self, user, redirect):
- args:
user - A User instance (logged in or not) redirect - The page that the user was going to be redirected to.
- return:
a redirect location