Scholarship Records¶
The geniza.footnotes
application provides models for
Source
records and
Footnotes
to connect sources to Document
objects.
models¶
- class geniza.footnotes.models.Authorship(*args, **kwargs)[source]¶
Ordered relationship between
Creator
andSource
.- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- class geniza.footnotes.models.Creator(*args, **kwargs)[source]¶
author or other contributor to a source
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- clean_fields(exclude=None)¶
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- get_deferred_fields()¶
Return a set containing names of deferred fields for this instance.
- refresh_from_db(using=None, fields=None)¶
Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
- class geniza.footnotes.models.CreatorManager(*args, **kwargs)[source]¶
Custom manager for
Creator
with natural key lookup
- class geniza.footnotes.models.Footnote(*args, **kwargs)[source]¶
a footnote that links a
Document
to aSource
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- property content_html¶
content as html, if available; returns a dictionary of lists. keys are canvas ids, list is html content.
- property content_html_str¶
content as a single string of html, if available
- property content_text¶
content as plain text, if available
- property content_text_canvases¶
content as a list of strings, one per canvas
- display()[source]¶
format footnote for display; used on document detail page and metadata export for old pgp site
- class geniza.footnotes.models.FootnoteQuerySet(model=None, query=None, using=None, hints=None)[source]¶
- class geniza.footnotes.models.Source(*args, **kwargs)[source]¶
a published or unpublished work related to geniza materials
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- all_languages()[source]¶
comma-delimited list of languages, in parentheses, used for the translation selector
- clean_fields(exclude=None)¶
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- formatted_display(extra_fields=True)[source]¶
Format source for display; used on document scholarship page. To omit publisher, place_published, and page_range fields, specify extra_fields=False.
- classmethod from_uri(uri)[source]¶
Given a URI for a Source (as used in transcription annotations), return the Source object matching the pk
- get_deferred_fields()¶
Return a set containing names of deferred fields for this instance.
- classmethod get_volume_from_shelfmark(shelfmark)[source]¶
Given a shelfmark, get our volume label. This logic was determined in migration 0011_split_goitein_typedtexts.py
- static id_from_uri(uri)[source]¶
Given a URi for a source (as used in transcription annotations), return the source id
- refresh_from_db(using=None, fields=None)¶
Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
- property uri¶
Generate a URI for this source to be used in transcription annotations, in order to filter them by associated source
- class geniza.footnotes.models.SourceLanguage(*args, **kwargs)[source]¶
language of a source document
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶