User:Andre Castro/2/django/manytomany: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "I want to introduce a character model to the [http://pzwart3.wdka.hro.nl/django/acastro/collect_spam/spam/ database of spam email messages] I have been developing. This will...")
 
No edit summary
Line 5: Line 5:
==The character field==
==The character field==
I must contain the following fields:
I must contain the following fields:
* Name
* Name - CharField(max_length=200, unique=True)
* Date of Birth (optional)
* Date of Birth - DateField(blank=True)  
* Date of Death  (optional)
* Date of Death  - DateField(blank=True)  
* Nationality (optional)
* Nationality - CharField(blank=True, max_length=200)  
* Occupation (optional)
* Occupation - CharField(blank=True, max_length=200)  


* Biography  (optional)
* Biography  - TextField(blank=True)
* Appearances in media (optional)
* Appearances in media - TextField(blank=True)
* Other (optional)
* Other - TextField(blank=True)
 
* Picture file  (optional)
* Rating  ( https://github.com/dcramer/django-ratings )


* '''Picture file - ImageField/FileField/FilePathField  (blank=True)'''
* '''Rating  ( https://github.com/dcramer/django-ratings ) (default=1)'''





Revision as of 13:47, 17 January 2013

I want to introduce a character model to the database of spam email messages I have been developing.

This will be a way to account for the characters in the spam narratives, either the ones described in them or narrating them.

The character field

I must contain the following fields:

  • Name - CharField(max_length=200, unique=True)
  • Date of Birth - DateField(blank=True)
  • Date of Death - DateField(blank=True)
  • Nationality - CharField(blank=True, max_length=200)
  • Occupation - CharField(blank=True, max_length=200)
  • Biography - TextField(blank=True)
  • Appearances in media - TextField(blank=True)
  • Other - TextField(blank=True)


  • be ManyToMany: a character can be present in more that one email; one email can have more than one character.
  • the LINK TABLE must allow for the misspellings of the character's name (eg: Mr. Castro was spelled Mr. Costro in email#40)