Bibliography - applebiter/gnatwriter GitHub Wiki

The Bibliography class represents a reference to another work, associated with a given Story. My preference would have been to name this class "Reference", but that was going to be problematic as the name for a database table. The Bibliography class is associated with the bibliographies table in the database.

Attributes

The attributes that are mapped to the bibliographies table in the database:

  • id: int The Bibliography ID
  • user_id: int The ID of the user who created this Bibliography entry
  • story_id: int The Story ID that this Bibliography references
  • title: str The referenced work's title
  • pages: str The pertinent pages of the referenced work
  • publisher: str The referenced work's publisher
  • publication_date: str The referenced work's publication date in date form: yyy-mm-dd
  • editor: str The referenced work's editor
  • created: str The referenced work's creation date in datetime form: yyy-mm-dd hh:mm:ss
  • modified: str The referenced work's last modification date in datetime form: yyy-mm-dd hh:mm:ss

The complex attributes supplied by the ORM:

  • user: User The user who created this Bibliography entry. The User class is associated with the users table in the database.
  • story: Story The Story to which this Bibliography entry belongs. The Story class is associated with the stories table in the database.
  • authors: List[BibliographyAuthor] The author(s) of the referenced work. The BibliographyyAuthor class is associated with the bibliographies_authors table in the database.

serialize()

serialize ( ) -> dict Only the attributes mapped to the bibliographies table will be present in the returned dictionary.