summaryrefslogtreecommitdiff
path: root/website/models.py
diff options
context:
space:
mode:
authorJayaram R Pai2014-09-20 19:42:34 +0530
committerJayaram R Pai2014-09-20 19:42:34 +0530
commita254d1aa4d10d0704c9f8981400257b17c52022b (patch)
tree262b8ab89a0549f3f4de0201d164678d27e13faa /website/models.py
parentbf059d176357efa0a61d1939a5f29e598505b77f (diff)
downloadscipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.tar.gz
scipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.tar.bz2
scipy2014-a254d1aa4d10d0704c9f8981400257b17c52022b.zip
completed CFP - basic testing done
Diffstat (limited to 'website/models.py')
-rw-r--r--website/models.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/website/models.py b/website/models.py
index 71a8362..d0cd85a 100644
--- a/website/models.py
+++ b/website/models.py
@@ -1,3 +1,16 @@
from django.db import models
+from django.contrib.auth.models import User
-# Create your models here.
+def get_document_dir(instance, filename):
+ return '%s/attachment/%s' % (instance.user, filename)
+
+class Proposal(models.Model):
+ user = models.ForeignKey(User)
+ title = models.CharField(max_length=250)
+ objective = models.CharField(max_length=512)
+ abstract = models.TextField(max_length=700)
+ bio = models.TextField(max_length=500)
+ link = models.CharField(max_length=128)
+ attachment = models.FileField(upload_to=get_document_dir)
+ date_created = models.DateTimeField(auto_now_add=True)
+ date_modified = models.DateTimeField(auto_now=True)