allura.ext.user_profile

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].

check_display()

Should return True if the section should be displayed.

display(*a, **kw)

Renders the section using the context from prepare_context() and the template, if check_display() returns True.

If overridden or this base class is not used, this method should return either plain text (which will be escaped) or a jinja2.Markup instance.

prepare_context(context)

Should be overridden to add any values to the template context prior to display.

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.

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.