summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorprathamesh2020-12-04 08:29:54 +0530
committerprathamesh2020-12-04 08:36:50 +0530
commit01efe49e230163d276c340a7de7317a949dde31a (patch)
tree03cd5cc5498865df3be8dc920bb40d45cd1afd07 /yaksh/models.py
parentb0ab5d93393d191ffbc6e0c4b0cc3ebc2624fc27 (diff)
downloadonline_test-01efe49e230163d276c340a7de7317a949dde31a.tar.gz
online_test-01efe49e230163d276c340a7de7317a949dde31a.tar.bz2
online_test-01efe49e230163d276c340a7de7317a949dde31a.zip
Add qrcode package to the requirements and fix PEP8
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index e9b2c1b..3182cc8 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -3215,7 +3215,7 @@ class QRcode(models.Model):
num = 5
for i in range(40):
try:
- self.short_key = key[0 : num]
+ self.short_key = key[0:num]
break
except django.db.IntegrityError:
num = num + 1
@@ -3234,7 +3234,6 @@ class QRcodeHandler(models.Model):
answerpaper = models.ForeignKey(AnswerPaper, on_delete=models.CASCADE)
question = models.ForeignKey(Question, on_delete=models.CASCADE)
-
def __str__(self):
return 'QRcode Handler for {0}'.format(self.user.username)
@@ -3253,4 +3252,3 @@ class QRcodeHandler(models.Model):
def can_use(self):
return self.answerpaper.is_attempt_inprogress()
-