project/kiwipycon/proceedings/models.py
changeset 87 1ec579a679e4
parent 84 d01c62c2a628
equal deleted inserted replaced
86:cbe77a26e7a3 87:1ec579a679e4
     7 
     7 
     8 class Paper(models.Model):
     8 class Paper(models.Model):
     9     """Data model for storing proceedings paper.
     9     """Data model for storing proceedings paper.
    10     """
    10     """
    11 
    11 
       
    12     # Title of the paper
    12     title = models.CharField(max_length=200)
    13     title = models.CharField(max_length=200)
       
    14 
       
    15     # Abstract to be published with the paper
    13     abstract = models.TextField()
    16     abstract = models.TextField()
       
    17 
       
    18     # Body text of the paper
    14     body = models.TextField()
    19     body = models.TextField()
       
    20 
       
    21     # Authors
       
    22     authors = models.ManyToManyField(User)
       
    23 
       
    24 
       
    25 class Attachments(models.Model):
       
    26     """Stores attachments for papers.
       
    27     """
       
    28 
       
    29     # Attachment for generating paper
       
    30     attachments = models.FileField(upload_to='attachments/%Y/%m/%d')
       
    31 
       
    32     # The paper to which this attachment belongs to
       
    33     paper = models.ForeignKey(Paper)