diff options
author | Parth Buch | 2012-06-18 16:45:43 +0530 |
---|---|---|
committer | Parth Buch | 2012-06-18 16:45:43 +0530 |
commit | bbb7ca69397b92fe958218471237b9047d82dfde (patch) | |
tree | 731f9cd82db7dae711954fcfa0c57db1b49b8631 /stapp/video/models.py | |
parent | d26fe5734fdea3a21dcc7e2f3cc900bf888633ca (diff) | |
download | stproject-bbb7ca69397b92fe958218471237b9047d82dfde.tar.gz stproject-bbb7ca69397b92fe958218471237b9047d82dfde.tar.bz2 stproject-bbb7ca69397b92fe958218471237b9047d82dfde.zip |
Displaying names instead of 'class' in django admin,gramatical changes
Diffstat (limited to 'stapp/video/models.py')
-rw-r--r-- | stapp/video/models.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/stapp/video/models.py b/stapp/video/models.py index 9c17a7a..b7122b1 100644 --- a/stapp/video/models.py +++ b/stapp/video/models.py @@ -2,15 +2,21 @@ from django.db import models from django.contrib.auth.models import User class Video(models.Model): """Videos to be uploaded..""" - video_name = models.CharField(max_length=128) - video_file = models.FileField(upload_to="videos") - video_descriotion = models.TextField() + name = models.CharField(max_length=128) + filename = models.FileField(upload_to="videos") + description = models.TextField() + + def __unicode__(self): + return self.name class Module(models.Model): name = models.CharField(max_length=128) description = models.TextField() vidio_list = models.ManyToManyField(Video) + def __unicode__(self): + return self.name + class Profile(models.Model): """User Profile describes data/information about regirstered user.""" user = models.OneToOneField(User) |