Citation Views and Rendering
For a full listing of the available views, see the urls.py file.
- Standard types of views available:
List views: Citations, Parties, Institutions, FundingStreams
Specific Record views: Citation, Party, Institution, FundingStreams
API List views: Citations, Parties, Institutions, FundingStreams
Specific API views: Citation, Party
Create/Edit UI view: Citation (able to create new instances of all the above)
Delete view: Citation (No other records able to be deleted via UI currently.)
Delete API views: Citations, Parties, Institutions, FundingStreams
- Miscellaneous Other Views:
Reviewer Request: Allows users to request access to review records.
- Render functions listed below may perform changes to the content rendered to the HTML view for a better user experience. This includes:
Adding links to the abstract paragraph based on references in the citation
Linking to the rights/licence info from the
RIGHTS_MAPRendering the references with linked DOIs and bold titles.
Rendering the Cite As option from the DOI and available info
Adding the STAC Code Snippet if available.
Permissions apply to all create/update/delete views including for the API (PUT/POST/DELETE methods), where a user/token provided must have both the add_citations and edit_<institution> permissions to edit an existing record, or just the add_citations permission to create new records.
- citations.views.create_new_permission(user, institution_id: str)[source]
Create a new permission type based on the newly added institution.
The user who created the new institution will automatically be given access to that new permission. This permission allows editing based on the
institution_idof the record.Creating a new record with an existing institution will only be allowed if the user already has permission for that institution.
- citations.views.get_citable_party(party: Parties)[source]
Get representation of a party in the Cite As field.
This is also done on rendering, to just assemble these fields in the correct manner.
- citations.views.render_code_snippet(citation_data: dict) str | None[source]
Get code snippet on rendering.
The code snippet is not saved in the database and is generated on viewing the record.
- citations.views.render_cite_as(citation: Citations)[source]
Generate the full Cite As description on loading the page.
This is generated on rendering the citation view.
- citations.views.render_abstract(data: dict) str[source]
Apply formatting in the form of links to references identified in the abstract
This occurs on rendering the citation view.
- citations.views.render_rights(data: dict) str[source]
Generate the Rights section with appropriate labelling and linking.
This is generated on rendering the citation view, assuming the Rights section is not empty.
- citations.views.render_reference_html(ref: dict) dict[source]
Apply bold to the reference title and link to the DOI.
This occurs on rendering the citation view.
- citations.views.fullname(party: dict) str[source]
Display the fullname of a party based on if the middle name is blank or not
- citations.views.deep_search(queryset, term: str, order_by: str, all_versions=True)[source]
Fuzzy search for a term within the queryset.
This also allows ordering of search results and filtering on versions.
- citations.views.filter_versions(queryset)[source]
Find only the latest version of every citation record.
Will find the titles of all records in the queryset and filter out the non-latest version records.
- citations.views.check_publish_ok(request, data: dict) tuple[source]
Send a message to the user (UI) if a DOI minting event is unsuccessful.
Repeat the checks done at publication such that a message can be generated to present to the user.
- class citations.views.GenericRenderedView(**kwargs)[source]
Generic processing for all UI views, including configuring CEDA branding templates
- class citations.views.PaginatedListView(**kwargs)[source]
Pagination for all UI List views using HTMX
- get_context_data(page_obj, page_number: int = 1, search_term=None, count=None, **kwargs)[source]
Handle pagination context including page number and search term if provided.
- class citations.views.GenericAPIView(**kwargs)[source]
Generic Method Additions to the API View
- class citations.views.SpecificAPIView(**kwargs)[source]
Specific View Methods
- class citations.views.PartiesView(**kwargs)[source]
- model
alias of
Parties
- serializer_class
alias of
PartiesSerializer
- class citations.views.InstitutionsView(**kwargs)[source]
- model
alias of
Institutions
- serializer_class
alias of
InstitutionsSerializer
- class citations.views.FundingStreamsView(**kwargs)[source]
- model
alias of
FundingStreams
- serializer_class
alias of
FundingStreamsSerializer
- class citations.views.CitationsView(**kwargs)[source]
- model
alias of
Citations
- serializer_class
alias of
CitationsSerializer
- get_context_data(*args, **kwargs)[source]
Handle pagination context including page number and search term if provided.
- class citations.views.InstitutionView(**kwargs)[source]
- model
alias of
Institutions
- serializer_class
alias of
InstitutionsSerializer
- class citations.views.FundingStreamView(**kwargs)[source]
- model
alias of
FundingStreams
- serializer_class
alias of
FundingStreamsSerializer
- class citations.views.InstitutionAPIView(**kwargs)[source]
List all institutions
- model
alias of
Institutions
- serializer_class
alias of
InstitutionsSerializer
- class citations.views.SpecificPartyAPIView(**kwargs)[source]
Action requests related to Specific Party
- model
alias of
Parties
- serializer_class
alias of
PartiesSerializer
- class citations.views.PartyAPIView(**kwargs)[source]
List all parties.
- model
alias of
Parties
- serializer_class
alias of
PartiesSerializer
- class citations.views.FundingStreamAPIView(**kwargs)[source]
List all funding streams.
- model
alias of
FundingStreams
- serializer_class
alias of
FundingStreamsSerializer
- class citations.views.CitationAPIView(**kwargs)[source]
List all funding streams.
- model
alias of
Citations
- serializer_class
alias of
CitationsSerializer
- class citations.views.SpecificCitationAPIView(**kwargs)[source]
List all funding streams.
- model
alias of
Citations
- serializer_class
alias of
CitationsSerializer
- class citations.views.CitationFormMixin(**kwargs)[source]
- model
alias of
Citations
- serializer_class
alias of
CitationsSerializer
- class citations.views.ConfirmDeleteCitationView(**kwargs)[source]
- model
alias of
Citations
- serializer_class
alias of
CitationsSerializer