testappproj/testapp/forms.py~
changeset 0 0b061d58aea3
equal deleted inserted replaced
-1:000000000000 0:0b061d58aea3
       
     1 from django import forms
       
     2 #from google.appengine.ext.db import djangoforms
       
     3 import models
       
     4 
       
     5 
       
     6 class ProblemForm(forms.ModelForm):
       
     7   name = forms.CharField(widget=forms.TextInput(attrs={'size': '80'}))
       
     8   categories = forms.CharField(widget=forms.TextInput(attrs={'size': '80'}))
       
     9   description = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}))
       
    10   examples = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}))
       
    11   skeleton = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}))
       
    12   tests = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}))
       
    13   other_tests = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}), required=False)
       
    14   solution = forms.CharField(widget=forms.Textarea(attrs={'rows': '20', 'cols': '80'}), required=False)
       
    15 
       
    16   class Meta:
       
    17     model = models.Problem
       
    18     exclude = ('author', 'created', 'modified')
       
    19 
       
    20 
       
    21 # class UploadForm(forms.ModelForm):
       
    22 #   file = forms.FileField()
       
    23 
       
    24 #   class Meta:
       
    25