eucrim.profile package

Submodules

eucrim.profile.apps module

class eucrim.profile.apps.AuthorConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'eucrim.profile'

eucrim.profile.models module

class eucrim.profile.models.AuthorPageManager(*args, **kwargs)[source]

Bases: ProfilePageManager

Custom manager for Author pages

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

class eucrim.profile.models.ProfileIndexPage(id, path, depth, numchild, translation_key, locale, latest_revision, live, has_unpublished_changes, first_published_at, last_published_at, live_revision, go_live_at, expire_at, expired, locked, locked_at, locked_by, title, draft_title, slug, content_type, url_path, owner, seo_title, show_in_menus, search_description, latest_revision_created_at, alias_of, page_ptr, body)[source]

Bases: HideShowInMenusField, BasePage

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

ajax_template = None
body

A placeholder class that provides a way to set the attribute on the model.

content_panels = [<wagtail.models.panels.PanelPlaceholder object>, <FieldPanel 'body' with model=None>]
get_context(request, *args, **kwargs)[source]
index_entries

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

is_creatable = True
max_count = 1
page_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

page_ptr_id
parent_page_types = ['core.HomePage']
promote_panels = [<MultiFieldPanel with model=None>]
show_in_menus = True
subpage_types = ['ProfilePage']
template = 'profile/profile_index_page.html'
class eucrim.profile.models.ProfilePage(id, path, depth, numchild, translation_key, locale, latest_revision, live, has_unpublished_changes, first_published_at, last_published_at, live_revision, go_live_at, expire_at, expired, locked, locked_at, locked_by, title, draft_title, slug, content_type, url_path, owner, seo_title, show_in_menus, search_description, latest_revision_created_at, alias_of, page_ptr, user, last_name, first_name, email, is_author, is_team, is_association_manager, team_role, academic_title, academic_posttitle, country, orcid_id, website, institution, institution_url, institution_abbr, department, position, about, avatar)[source]

Bases: BasePage

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

about

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

academic_posttitle

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

academic_title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ajax_template = None
arcana_markdown()[source]
articlepageauthor_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_reverse_many_to_one_manager() defined below.

author_objects = <eucrim.profile.models.AuthorPageManager object>
avatar

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

avatar_id
content_panels = [<FieldPanel 'is_author' with model=None>, <MultiFieldPanel with model=None>, <FieldPanel 'about' with model=None>, <MultiFieldPanel with model=None>]
country

A descriptor for country fields on a model instance. Returns a Country when accessed so you can do things like:

>>> from people import Person
>>> person = Person.object.get(name='Chris')

>>> person.country.name
'New Zealand'

>>> person.country.flag
'/static/flags/nz.gif'
department

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

first_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property get_articles
get_country_display(*, field=<django_countries.fields.CountryField: country>)
property get_full_name
property get_full_name_wo_titles
property get_institution
property get_news
property get_obj_og_description
property get_obj_og_image
get_team_role_display(*, field=<django.db.models.fields.CharField: team_role>)
index_entries

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

institution

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

institution_abbr

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

institution_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_association_manager

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_author

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_creatable = True
is_team

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

news

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <eucrim.profile.models.ProfilePageManager object>
orcid_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

page_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

page_ptr_id
parent_page_types = ['profile.ProfileIndexPage']
position

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

promote_panels = []
save(*args, **kwargs)[source]

Writes the page to the database, performing additional housekeeping tasks to ensure data integrity:

  • locale, draft_title and slug are set to default values if not provided, with slug being generated from the title with a suffix to ensure uniqueness within the parent page where necessary

  • The url_path field is set based on the slug and the parent page

  • If the slug has changed, the url_path of this page and all descendants is updated and a page_slug_changed signal is sent

New pages should be saved by passing the unsaved page instance to the add_child() or add_sibling() method of an existing page, which will correctly update the fields responsible for tracking the page’s location in the tree.

If clean=False is passed, the page is saved without validation. This is appropriate for updates that only change metadata such as latest_revision while keeping content and page location unchanged.

If clean=True is passed (the default), and the page has live=True set, the page is validated using full_clean() before saving.

If clean=True is passed, and the page has live=False set, only the title and slug fields are validated.

search_fields = [<SearchField: title>, <AutocompleteField: title>, <FilterField: title>, <FilterField: id>, <FilterField: live>, <FilterField: owner>, <FilterField: content_type>, <FilterField: path>, <FilterField: depth>, <FilterField: locked>, <FilterField: show_in_menus>, <FilterField: first_published_at>, <FilterField: last_published_at>, <FilterField: latest_revision_created_at>, <FilterField: locale>, <FilterField: translation_key>, <AutocompleteField: first_name>, <AutocompleteField: last_name>, <SearchField: orcid_id>, <AutocompleteField: position>]
show_in_menus = False
subpage_types = []
team_objects = <eucrim.profile.models.TeamPageManager object>
team_role

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

template = 'profile/profile_page.html'
user

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

user_id
website

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class eucrim.profile.models.ProfilePageManager(*args, **kwargs)[source]

Bases: BasePageManagerFromPageQuerySet

Custom manager for Profile pages

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

class eucrim.profile.models.TeamPageManager(*args, **kwargs)[source]

Bases: ProfilePageManager

Custom manager for Team pages

get_queryset()[source]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

eucrim.profile.wagtail_hooks module

eucrim.profile.wagtail_hooks.register_viewset()[source]

Module contents