diff options
Diffstat (limited to 'website/models.py')
-rwxr-xr-x | website/models.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/website/models.py b/website/models.py index 53c5422..fff26ce 100755 --- a/website/models.py +++ b/website/models.py @@ -5,9 +5,9 @@ from social.apps.django_app.default.models import UserSocialAuth from scipy2016 import settings def get_document_dir(instance, filename): - ename, eext = instance.user.email.split("@") + # ename, eext = instance.user.email.split("@") fname, fext = filename.split(".") - return '%s/attachment/%s.%s' % (instance.user, str(instance.user)+str(fext), fext) + return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, str(instance.user)+str(fext), fext) class Proposal(models.Model): user = models.ForeignKey(User) @@ -16,14 +16,18 @@ class Proposal(models.Model): phone = models.CharField(max_length = 20) title = models.CharField(max_length=250) abstract = models.TextField(max_length=700) - prerequisite = models.CharField(max_length=250) + prerequisite = models.CharField(max_length=750) + duration = models.DurationField() attachment = models.FileField(upload_to=get_document_dir) date_created = models.DateTimeField(auto_now_add=True) date_modified = models.DateTimeField(auto_now=True) status = models.CharField(max_length = 100, default='Pending', editable=True) - + proposal_type = models.CharField(max_length = 100) + tags = models.CharField(max_length = 250) + rate = models.CharField(max_length=100) class Comments(models.Model): proposal = models.ForeignKey(Proposal) user = models.ForeignKey(User) comment = models.CharField(max_length=700) + # rate = models.CharField(max_length =100) |