diff options
author | Hardik Ghaghada | 2015-07-03 16:00:14 +0530 |
---|---|---|
committer | Hardik Ghaghada | 2015-07-03 16:00:14 +0530 |
commit | 0ddbc4e700233f84764a91b175d23156842bfe13 (patch) | |
tree | 8656227bf9dafb8e429c016cc1bca946729e0455 /website/models.py | |
parent | f678c4cebeb6d200a88d290fa64289025bd5294b (diff) | |
parent | 3bf49ac69df179a731823679bb2e460a034851fd (diff) | |
download | SciPy2015-0ddbc4e700233f84764a91b175d23156842bfe13.tar.gz SciPy2015-0ddbc4e700233f84764a91b175d23156842bfe13.tar.bz2 SciPy2015-0ddbc4e700233f84764a91b175d23156842bfe13.zip |
Merge pull request #3 from FOSSEE/CFP
Cfp
Diffstat (limited to 'website/models.py')
-rw-r--r-- | website/models.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/website/models.py b/website/models.py index 71a8362..e5eb78c 100644 --- a/website/models.py +++ b/website/models.py @@ -1,3 +1,29 @@ from django.db import models +from django.contrib.auth.models import User -# Create your models here. +from social.apps.django_app.default.models import UserSocialAuth +from scipy2015 import settings + +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=1024) + abstract = models.TextField(max_length=1024) + content_link = models.CharField(max_length=1024) + speaker_link = models.CharField(max_length=1024) + bio = models.TextField(max_length=512) + attachment = models.FileField(upload_to=get_document_dir) + date_created = models.DateTimeField(auto_now_add=True) + date_modified = models.DateTimeField(auto_now=True) + contact_number = models.IntegerField(max_length=10) + def __unicode__(self): + name = self.user.username + return '%s'%(name) + + +class Comments(models.Model): + proposal = models.ForeignKey(Proposal) + user = models.ForeignKey(User) + comment = models.CharField(max_length=700) |