eucrim.profile package
Submodules
eucrim.profile.apps module
eucrim.profile.models module
- class eucrim.profile.models.AuthorPageManager(*args, **kwargs)[source]
Bases:
ProfilePageManagerCustom manager for Author pages
- 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>]
- 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.commentsis 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.placeis aForwardOneToOneDescriptorinstance.
- page_ptr_id
- parent_page_types = ['core.HomePage']
- promote_panels = [<MultiFieldPanel with model=None>]
- 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
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.commentsis 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.placeis aForwardOneToOneDescriptorinstance.
- 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_titleandslugare set to default values if not provided, withslugbeing generated from the title with a suffix to ensure uniqueness within the parent page where necessaryThe
url_pathfield is set based on theslugand the parent pageIf the
slughas changed, theurl_pathof 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()oradd_sibling()method of an existing page, which will correctly update the fields responsible for tracking the page’s location in the tree.If
clean=Falseis 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=Trueis passed (the default), and the page haslive=Trueset, the page is validated usingfull_clean()before saving.If
clean=Trueis passed, and the page haslive=Falseset, 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>]
- 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.placeis aForwardOneToOneDescriptorinstance.
- 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:
BasePageManagerFromPageQuerySetCustom manager for Profile pages
- class eucrim.profile.models.TeamPageManager(*args, **kwargs)[source]
Bases:
ProfilePageManagerCustom manager for Team pages