from django.db import models, connection
from django.contrib.auth.models import User
from django import forms

#class Comment(forms.Form):
#    visitor = forms.CharField(max_length=20)
#    email = forms.EmailField(max_length=20, required=False)
#    content = forms.CharField(max_length=200, widget=forms.Textarea())

class kkdata(models.Model): 
    word = models.CharField(max_length=20)
    kk = models.CharField(max_length=20)
    def __unicode__(self):
        return self.word

class lesson(models.Model):
    name = models.CharField(max_length=30)
    quantity = models.CharField(max_length=3)
    def __unicode__(self):
        return self.name 

class vocabulary(models.Model):
    number = models.CharField(max_length=3)
    name = models.CharField(max_length=20)
    kk = models.CharField(max_length=20)
    pos = models.CharField(max_length=10)
    tran = models.CharField(max_length=20)
    sen = models.CharField(max_length=100)
    voca = models.ForeignKey(lesson)
    def __unicode__(self):
        return self.name

class history(models.Model):
    username = models.CharField(max_length=20)
    course = models.CharField(max_length=30)
    topic1 = models.CharField(max_length=20)
    topic2 = models.CharField(max_length=20)
    topic3 = models.CharField(max_length=20)
    topic4 = models.CharField(max_length=20)
    topic5 = models.CharField(max_length=20)
    topic6 = models.CharField(max_length=20)
    topic7 = models.CharField(max_length=20)
    topic8 = models.CharField(max_length=20)
    topic9 = models.CharField(max_length=20)
    topic10 = models.CharField(max_length=20)
    topic11 = models.CharField(max_length=20)
    topic12 = models.CharField(max_length=20)
    topic13 = models.CharField(max_length=20)
    topic14 = models.CharField(max_length=20)
    topic15 = models.CharField(max_length=20)
    topic16 = models.CharField(max_length=20)
    topic17 = models.CharField(max_length=20)
    topic18 = models.CharField(max_length=20)
    topic19 = models.CharField(max_length=20)
    topic20 = models.CharField(max_length=20)
    topic21 = models.CharField(max_length=20)
    topic22 = models.CharField(max_length=20)
    topic23 = models.CharField(max_length=20)
    topic24 = models.CharField(max_length=20)
    topic25 = models.CharField(max_length=20)
    topic26 = models.CharField(max_length=20)
    topic27 = models.CharField(max_length=20)
    topic28 = models.CharField(max_length=20)
    topic29 = models.CharField(max_length=20)
    topic30 = models.CharField(max_length=20) 
    history1 = models.CharField(max_length=20, blank=True)
    history2 = models.CharField(max_length=20, blank=True)
    history3 = models.CharField(max_length=20, blank=True)
    history4 = models.CharField(max_length=20, blank=True)
    history5 = models.CharField(max_length=20, blank=True)
    history6 = models.CharField(max_length=20, blank=True)
    history7 = models.CharField(max_length=20, blank=True)
    history8 = models.CharField(max_length=20, blank=True)
    history9 = models.CharField(max_length=20, blank=True)
    history10 = models.CharField(max_length=20, blank=True)
    history11 = models.CharField(max_length=20, blank=True)
    history12 = models.CharField(max_length=20, blank=True)
    history13 = models.CharField(max_length=20, blank=True)
    history14 = models.CharField(max_length=20, blank=True)
    history15 = models.CharField(max_length=20, blank=True)
    history16 = models.CharField(max_length=20, blank=True)
    history17 = models.CharField(max_length=20, blank=True)
    history18 = models.CharField(max_length=20, blank=True)
    history19 = models.CharField(max_length=20, blank=True)
    history20 = models.CharField(max_length=20, blank=True)
    history21 = models.CharField(max_length=20, blank=True)
    history22 = models.CharField(max_length=20, blank=True)
    history23 = models.CharField(max_length=20, blank=True)
    history24 = models.CharField(max_length=20, blank=True)
    history25 = models.CharField(max_length=20, blank=True)
    history26 = models.CharField(max_length=20, blank=True)
    history27 = models.CharField(max_length=20, blank=True)
    history28 = models.CharField(max_length=20, blank=True)
    history29 = models.CharField(max_length=20, blank=True)
    history30 = models.CharField(max_length=20, blank=True)
    vocaa = models.ForeignKey(User)
    def __unicode__(self): 
        return self.course
    
class record(models.Model):
    username = models.CharField(max_length=20)
#    course = models.CharField(max_length=30)
#    topic1 = models.CharField(max_length=20)
#    topic2 = models.CharField(max_length=20)
#    topic3 = models.CharField(max_length=20)
#    topic4 = models.CharField(max_length=20)
#    topic5 = models.CharField(max_length=20)
#    topic6 = models.CharField(max_length=20)
#    topic7 = models.CharField(max_length=20)
#    topic8 = models.CharField(max_length=20)
#    topic9 = models.CharField(max_length=20)
#    topic10 = models.CharField(max_length=20)
#    topic11 = models.CharField(max_length=20)
#    topic12 = models.CharField(max_length=20)
#    topic13 = models.CharField(max_length=20)
#    topic14 = models.CharField(max_length=20)
#    topic15 = models.CharField(max_length=20)
#    topic16 = models.CharField(max_length=20)
#    topic17 = models.CharField(max_length=20)
#    topic18 = models.CharField(max_length=20)
#    topic19 = models.CharField(max_length=20)
#    topic20 = models.CharField(max_length=20)
#    topic21 = models.CharField(max_length=20)
#    topic22 = models.CharField(max_length=20)
#    topic23 = models.CharField(max_length=20)
#    topic24 = models.CharField(max_length=20)
#    topic25 = models.CharField(max_length=20)
#    topic26 = models.CharField(max_length=20)
#    topic27 = models.CharField(max_length=20)
#    topic28 = models.CharField(max_length=20)
#    topic29 = models.CharField(max_length=20)
#    topic30 = models.CharField(max_length=20)
    result1 = models.CharField(max_length=20, blank=True)
    result2 = models.CharField(max_length=20, blank=True)
    result3 = models.CharField(max_length=20, blank=True)
    result4 = models.CharField(max_length=20, blank=True)
    result5 = models.CharField(max_length=20, blank=True)
    result6 = models.CharField(max_length=20, blank=True)
    result7 = models.CharField(max_length=20, blank=True)
    result8 = models.CharField(max_length=20, blank=True)
    result9 = models.CharField(max_length=20, blank=True)
    result10 = models.CharField(max_length=20, blank=True)
    result11 = models.CharField(max_length=20, blank=True)
    result12 = models.CharField(max_length=20, blank=True)
    result13 = models.CharField(max_length=20, blank=True)
    result14 = models.CharField(max_length=20, blank=True)
    result15 = models.CharField(max_length=20, blank=True)
    result16 = models.CharField(max_length=20, blank=True)
    result17 = models.CharField(max_length=20, blank=True)
    result18 = models.CharField(max_length=20, blank=True)
    result19 = models.CharField(max_length=20, blank=True)
    result20 = models.CharField(max_length=20, blank=True)
    result21 = models.CharField(max_length=20, blank=True)
    result22 = models.CharField(max_length=20, blank=True)
    result23 = models.CharField(max_length=20, blank=True)
    result24 = models.CharField(max_length=20, blank=True)
    result25 = models.CharField(max_length=20, blank=True)
    result26 = models.CharField(max_length=20, blank=True)
    result27 = models.CharField(max_length=20, blank=True)
    result28 = models.CharField(max_length=20, blank=True)
    result29 = models.CharField(max_length=20, blank=True)
    result30 = models.CharField(max_length=20, blank=True)
    answer1 = models.CharField(max_length=20, blank=True)
    answer2 = models.CharField(max_length=20, blank=True)
    answer3 = models.CharField(max_length=20, blank=True)
    answer4 = models.CharField(max_length=20, blank=True)
    answer5 = models.CharField(max_length=20, blank=True)
    answer6 = models.CharField(max_length=20, blank=True)
    answer7 = models.CharField(max_length=20, blank=True)
    answer8 = models.CharField(max_length=20, blank=True)
    answer9 = models.CharField(max_length=20, blank=True)
    answer10 = models.CharField(max_length=20, blank=True)
    answer11 = models.CharField(max_length=20, blank=True)
    answer12 = models.CharField(max_length=20, blank=True)
    answer13 = models.CharField(max_length=20, blank=True)
    answer14 = models.CharField(max_length=20, blank=True)
    answer15 = models.CharField(max_length=20, blank=True)
    answer16 = models.CharField(max_length=20, blank=True)
    answer17 = models.CharField(max_length=20, blank=True)
    answer18 = models.CharField(max_length=20, blank=True)
    answer19 = models.CharField(max_length=20, blank=True)
    answer20 = models.CharField(max_length=20, blank=True)
    answer21 = models.CharField(max_length=20, blank=True)
    answer22 = models.CharField(max_length=20, blank=True)
    answer23 = models.CharField(max_length=20, blank=True)
    answer24 = models.CharField(max_length=20, blank=True)
    answer25 = models.CharField(max_length=20, blank=True)
    answer26 = models.CharField(max_length=20, blank=True)
    answer27 = models.CharField(max_length=20, blank=True)
    answer28 = models.CharField(max_length=20, blank=True)
    answer29 = models.CharField(max_length=20, blank=True)
    answer30 = models.CharField(max_length=20, blank=True)
#    date_time = models.DateTimeField()
    score = models.CharField(max_length=3)
    users = models.ForeignKey(User)
    lessons = models.ForeignKey(lesson)
    def __unicode__(self):
        return self.score

# Create your models here.
                               
