ObjectClass:awards

From ISFDB
Jump to navigation Jump to search

Introduction

  • Location: common/awardClass.py
  • Purpose: used to edit award information.

Data

  • self.db - Pointer to the MySQLdb object. Set on initialization.

These following are the core data values of this object. They have default values of .

  • self.award_authors - Array of authors associated with this award.
  • self.award_id - Award record number in the database.
  • self.award_title - Title of the work receiving the award.
  • self.award_year - Year of the award.
  • self.award_ttype - The award type.
  • self.award_atype - The award category.
  • self.award_level - The win level of the award.
  • self.award_movie - IMDB URL for movies.

The following data are used to indicate whether of not one of the data values above have been set. This is necessary when editing to differentiate between a data value which hasn't been set yet, to one that is being cleared. These all have default values of 0:

  • self.used_id - Indicates if self.award_id has been set.
  • self.used_title - Indicates if self.award_title has been set.
  • self.used_year - Indicates if self.award_year has been set.
  • self.used_ttype - Indicates if self.award_ttype has been set.
  • self.used_atype - Indicates if self.award_atype has been set.
  • self.used_level - Indicates if self.award_level has been set.
  • self.used_movie - Indicates if self.award_movie has been set.
  • self.num_authors - Indicates the number of self.award_authors which have been set.


Methods

  • load(self, id)
  • loadXML(self, id)
  • loadCommon(self, id, doXML)
  • cgi2obj(self)