equal
deleted
inserted
replaced
|
1 # -*- coding: utf-8 -*- |
|
2 from __future__ import absolute_import |
|
3 |
|
4 from django.db import models |
|
5 from django.contrib.auth.models import User |
|
6 |
|
7 |
|
8 class Paper(models.Model): |
|
9 """Data model for storing proceedings paper. |
|
10 """ |
|
11 |
|
12 # Title of the paper |
|
13 title = models.CharField(max_length=200) |
|
14 |
|
15 # Abstract to be published with the paper |
|
16 abstract = models.TextField() |
|
17 |
|
18 # Body text of the paper |
|
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) |