diff options
Diffstat (limited to 'tbc/models.py')
-rw-r--r-- | tbc/models.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tbc/models.py b/tbc/models.py index 7deb31c..9b2adbf 100644 --- a/tbc/models.py +++ b/tbc/models.py @@ -2,7 +2,7 @@ from django.db import models from django.contrib.auth.models import User from PythonTBC import settings from django.contrib.admin.models import LogEntry -from local import sitemap_path +from .local import sitemap_path from taggit.managers import TaggableManager CATEGORY = (("fluid mechanics", "Fluid Mechanics"), @@ -82,7 +82,7 @@ class Profile(models.Model): about_proj = models.CharField(max_length=50, choices=ABOUT_PROJ) city = models.CharField(max_length=50, default=None) state = models.CharField(max_length=50, default=None) - pin_code = models.IntegerField(max_length=6, default=None) + pin_code = models.IntegerField(default=None) def __unicode__(self): name = self.user.first_name or 'Profile' return '%s'%(name) @@ -103,7 +103,7 @@ class Book(models.Model): isbn = models.CharField(max_length=50) edition = models.CharField(max_length=15) year_of_pub = models.CharField(max_length=4) - no_chapters = models.IntegerField(max_length=2, default=0, blank=True) + no_chapters = models.IntegerField(default=0, blank=True) contributor = models.ForeignKey(Profile) reviewer = models.ForeignKey(Reviewer) approved = models.BooleanField(default=False) @@ -144,7 +144,7 @@ class TempBook(models.Model): isbn = models.CharField(max_length=50) edition = models.CharField(max_length=15) year_of_pub = models.CharField(max_length=4) - no_chapters = models.IntegerField(max_length=2) + no_chapters = models.IntegerField() def __unicode__(self): name = self.title or 'Book' return '%s'%(name) @@ -177,12 +177,12 @@ class ActivityLog(LogEntry): class AicteBook(models.Model): title = models.TextField() - author = models.CharField(max_length=300L) - category = models.CharField(max_length=32L) - publisher_place = models.CharField(max_length=200L) - isbn = models.CharField(max_length=50L) - edition = models.CharField(max_length=15L) - year_of_pub = models.CharField(max_length=4L) + author = models.CharField(max_length=300) + category = models.CharField(max_length=32) + publisher_place = models.CharField(max_length=200) + isbn = models.CharField(max_length=50) + edition = models.CharField(max_length=15) + year_of_pub = models.CharField(max_length=4) proposed = models.BooleanField(default=False) def __unicode__(self): notebook = self.title or 'Book' |