project/scipycon/proceedings/models.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Wed, 14 Jul 2010 19:34:12 +0530
changeset 101 61fc4aa7a09a
parent 94 87e77aa18610
child 104 1a83a26756c3
permissions -rw-r--r--
Added base app from which all other apps inherit and made corresponding changes in other apps.

from django.db import models
from django.contrib.auth.models import User

from project.scipycon.base import models as base_models


class Paper(base_models.Base):
    """Data model for storing proceedings paper.
    """

    # Title of the paper
    title = models.CharField(max_length=200)

    # Abstract to be published with the paper
    abstract = models.TextField()

    # Body text of the paper
    body = models.TextField()

    # Authors
    authors = models.ManyToManyField(User)


class Attachments(models.Base):
    """Stores attachments for papers.
    """

    # Attachment for generating paper
    attachments = models.FileField(upload_to='attachments/%Y/%m/%d')

    # The paper to which this attachment belongs to
    paper = models.ForeignKey(Paper)