allura.ext.user_profile
¶
- class allura.ext.user_profile.user_main.PersonalDataSection(user, project)¶
- prepare_context(context)¶
Should be overridden to add any values to the template context prior to display.
- class allura.ext.user_profile.user_main.ProfileSectionBase(user, project)¶
This is the base class for sections on the Profile tool.
- template¶
A resource string pointing to the template for this section. E.g.:
template = "allura.ext.user_profile:templates/projects.html"
Sections must be pointed to by an entry-point in the group
[allura.user_profile.sections]
.
- class allura.ext.user_profile.user_main.ProjectsSection(user, project)¶
- class allura.ext.user_profile.user_main.SkillsSection(user, project)¶
- check_display()¶
Should return True if the section should be displayed.
- class allura.ext.user_profile.user_main.SocialSection(user, project)¶
- check_display()¶
Should return True if the section should be displayed.
- class allura.ext.user_profile.user_main.ToolsSection(user, project)¶
- class allura.ext.user_profile.user_main.UserProfileApp(user, config)¶
This is the Profile tool, which is automatically installed as the default (first) tool on any user project.
Return the admin menu for this Application.
Default implementation will return a menu with up to 4 links:
- ‘Permissions’, if the current user has admin access to the
project in which this Application is installed
- ‘Options’, if this Application has custom options, or
force_options
is True
‘Rename’, for editing this Application’s label
‘Webhooks’, if this Application can trigger any webhooks
Subclasses should override this method to provide additional admin menu items.
- Parameters:
force_options – always include an ‘Options’ link in the menu, even if this Application has no custom options
- Returns:
a list of
SitemapEntries
- install(project)¶
Whatever logic is required to initially set up a tool
Return a list of
SitemapEntries
to display in the main project nav for this Application.Default implementation returns
sitemap
without any children.
- property profile_sections¶
Loads and caches user profile sections from the entry-point group
[allura.user_profile.sections]
.Profile sections are loaded unless disabled (see allura.lib.helpers.iter_entry_points) and are sorted according to the user_profile_sections.order config value.
The config should contain a comma-separated list of entry point names in the order that they should appear in the profile. Unknown or disabled sections are ignored, and available sections that are not specified in the order come after all explicitly ordered sections, sorted randomly.
- uninstall(project)¶
Whatever logic is required to tear down a tool
- class allura.ext.user_profile.user_main.UserProfileController¶
- get_feed(project, app, user)¶
Return a
allura.controllers.feed.FeedArgs
object describing the xml feed for this controller.Overrides
allura.controllers.feed.FeedController.get_feed()
.
- index(**kw)¶
- send_message()¶
Render form for sending a message to another user.
- send_user_message(subject='', message='', cc=None, reply_to_real_address=None)¶
Handle POST for sending a message to another user.