ObjectClass:authors
Jump to navigation
Jump to search
Introduction
- Location: common/authorClass.py
- Purpose: used to edit author 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.author_id - The database record number for the author.
- self.author_canonical - The author's canonical name.
- self.author_legalname - The author's legal name.
- self.author_lastname - The author's last name.
- self.author_birthplace - Birthplace of the author.
- self.author_birthdate - Birthdate of the author.
- self.author_deathdate - Deathdate of the author.
- self.author_emails - Email addresses associated with the author.
- self.author_webpages - Webpages associated with the author.
- self.author_wikipedia - The author's wikipedia URL.
- self.author_imdb - The author's IMDB URL.
- self.author_image - The author's image URL.
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.author_id has been set.
- self.used_canonical - Indicates if self.author_canonical has been set.
- self.used_legalname - Indicates if self.author_legalname has been set.
- self.used_lastname - Indicates if self.author_lastname has been set.
- self.used_birthplace - Indicates if self.author_birthplace has been set.
- self.used_birthdate - Indicates if self.author_birthdate has been set.
- self.used_deathdate - Indicates if self.author_deathdate has been set.
- self.used_emails - Indicates if self.author_emails has been set.
- self.used_webpages - Indicates if self.author_webpages has been set.
- self.used_wikipedia - Indicates if self.author_wikipedia has been set.
- self.used_imdb - Indicates if self.author_imdb has been set.
- self.used_image - Indicates if self.author_image has been set.
Methods
- load(self, id) - Loads from the database with record=id into object data format.
- obj2xml(self) - Converts from object data format to XML.
- xml2obj(self, xml) - Converts from the XML data into object data format.
- cgi2obj(self) - Converts CGI form information into object data format. CGI data is submitted as HTTP POST data, conforming to the HTML variables specified for this class.