summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
authorkinitrupti2016-10-24 12:32:11 +0530
committerkinitrupti2016-10-24 12:32:11 +0530
commiteb3321f80def84e84329f213e21ef5ac94d4ccd6 (patch)
tree4c26ad501f9387e3d16c389603ae1432bd2c64fd /tbc
parent6da84d8c334e16ebea6597d8b83d51552935ed00 (diff)
downloadPython-TBC-Interface-eb3321f80def84e84329f213e21ef5ac94d4ccd6.tar.gz
Python-TBC-Interface-eb3321f80def84e84329f213e21ef5ac94d4ccd6.tar.bz2
Python-TBC-Interface-eb3321f80def84e84329f213e21ef5ac94d4ccd6.zip
upgraded to python3
Diffstat (limited to 'tbc')
-rw-r--r--tbc/admin.py2
-rw-r--r--tbc/models.py14
-rw-r--r--tbc/views.py8
3 files changed, 12 insertions, 12 deletions
diff --git a/tbc/admin.py b/tbc/admin.py
index 30b5b34..4707d33 100644
--- a/tbc/admin.py
+++ b/tbc/admin.py
@@ -1,4 +1,4 @@
-from models import *
+from .models import *
from django.contrib import admin
admin.site.register(Profile)
diff --git a/tbc/models.py b/tbc/models.py
index 8cb6c06..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"),
@@ -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'
diff --git a/tbc/views.py b/tbc/views.py
index 9d8b7d4..3e9f0f5 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -8,12 +8,12 @@ from django.contrib.auth import authenticate, login, logout
from django.contrib.admin.models import CHANGE
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
-from models import *
+from .models import *
from tbc.forms import *
-import local
+from . import local
import os
import zipfile
-import StringIO
+import io
import smtplib
import shutil
import string
@@ -1362,7 +1362,7 @@ def get_certificate(request, book_id=None):
else:
error = True
add_log(user, book, CHANGE, err, proposal_id)
- except Exception, e:
+ except Exception as e:
error = True
add_log(user, book, CHANGE, e, proposal_id)