summaryrefslogtreecommitdiff
path: root/certificate/models.py
diff options
context:
space:
mode:
authorprathamesh2015-04-06 14:19:57 +0530
committerprathamesh2015-04-06 14:19:57 +0530
commitca585020fc9c3574937762b091120cacf3fb6f44 (patch)
treebf819171096d024f1a4ece3d3b70b5c69f802dfc /certificate/models.py
parent7f2275eee5756ff3c4f54d3679fae164915e1be9 (diff)
downloadcertificate-generator-ca585020fc9c3574937762b091120cacf3fb6f44.tar.gz
certificate-generator-ca585020fc9c3574937762b091120cacf3fb6f44.tar.bz2
certificate-generator-ca585020fc9c3574937762b091120cacf3fb6f44.zip
Certificates for Drupal Mumbai Camp 2015
Implemented certificate generator for Drupal Mumbai Camp. Made changes to the method of QR code generation. - hexadecimal hash is generated. - first few characters of hash are considered as unique key. - If the key is not unique then an additional character is added to the key. - QR code now contains only the link with the key. - the link gets the data of the certificate holder. - in the absence of the QR code scanner, the key and link are provided below the QR code.
Diffstat (limited to 'certificate/models.py')
-rw-r--r--certificate/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/certificate/models.py b/certificate/models.py
index 3974bde..7bb589b 100644
--- a/certificate/models.py
+++ b/certificate/models.py
@@ -29,6 +29,8 @@ class Certificate(models.Model):
workshop = models.CharField(max_length=100, null=True, blank=True)
paper = models.CharField(max_length=100, null=True, blank=True)
verified = models.IntegerField(default=0)
+ serial_key = models.CharField(max_length=200, null=True)
+ short_key = models.CharField(max_length=50, null=True)
class Scilab_participant(models.Model):
''' Autogenerated model file csvimport Mon Dec 1 07:46:00 2014 '''
@@ -107,3 +109,13 @@ class Scipy_speaker(models.Model):
paper = models.CharField(max_length=300)
purpose = models.CharField(max_length=10, default='SPC')
attendance = models.BooleanField(default=False)
+
+class Drupal_camp(models.Model):
+ firstname = models.CharField(max_length=200)
+ lastname = models.CharField(max_length=200)
+ email = models.EmailField(null=True, blank=True)
+ # Day 1 - 1, Day 2 - 2, Both days - 3, else 0
+ attendance = models.PositiveSmallIntegerField(default=0)
+ role = models.CharField(max_length=100, null=True, blank=True)
+ purpose = models.CharField(max_length=10, default='DCM')
+ is_student = models.IntegerField(default=0)