from django.db import models from django.contrib.auth.models import User # Create your models here. events = ( ('SLC', 'Scilab Conference'), ('SPC', 'Scipy Conference'), ('PTC', 'Python Textbook Companion'), ('STC', 'Scilab Textbook Companion'), ) class Profile(models.Model): user = models.OneToOneField(User) # other details uin = models.CharField(max_length=50) #2 intialletters + 6 hexadigits attendance = models.NullBooleanField() class Event(models.Model): purpose = models.CharField(max_length=25, choices=events) start_date = models.DateTimeField() end_date = models.DateTimeField() # other details class Certificate(models.Model): name = models.CharField(max_length=100) email = models.CharField(max_length=50, null=True, blank=True) serial_no = models.CharField(max_length=50) #purpose+uin+1stletter counter = models.IntegerField() class Scilab_import(models.Model): ''' Autogenerated model file csvimport Mon Dec 1 07:46:00 2014 ''' id = models.IntegerField(primary_key=True, null=False) ticket_number = models.IntegerField(default=0, null=False, blank=False) name = models.CharField(max_length=50, null=True, blank=True) email = models.CharField(max_length=50, null=True, blank=True) ticket = models.CharField(max_length=50, null=True, blank=True) date = models.CharField(max_length=50, null=True, blank=True) order_id = models.IntegerField(default=0, null=True, blank=True) purpose = models.CharField(max_length=10, default='SLC') class Meta: managed = True