author | amit@thunder |
Mon, 17 May 2010 22:33:59 +0530 | |
changeset 0 | 0b061d58aea3 |
permissions | -rw-r--r-- |
0
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
1 |
from django import forms |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
2 |
#from google.appengine.ext.db import djangoforms |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
3 |
import models |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
4 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
5 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
6 |
class ProblemForm(forms.ModelForm): |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
7 |
name = forms.CharField(widget=forms.TextInput(attrs={'size': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
8 |
categories = forms.CharField(widget=forms.TextInput(attrs={'size': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
9 |
description = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
10 |
examples = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
11 |
skeleton = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
12 |
tests = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'})) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
13 |
other_tests = forms.CharField(widget=forms.Textarea(attrs={'rows': '10', 'cols': '80'}), required=False) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
14 |
solution = forms.CharField(widget=forms.Textarea(attrs={'rows': '20', 'cols': '80'}), required=False) |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
15 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
16 |
class Meta: |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
17 |
model = models.Problem |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
18 |
exclude = ('author', 'created', 'modified') |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
19 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
20 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
21 |
# class UploadForm(forms.ModelForm): |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
22 |
# file = forms.FileField() |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
23 |
|
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
24 |
# class Meta: |
0b061d58aea3
First commit to Fossee of testapp has the basic Pykata framework on django with some specific changes to Problems model and some views to suit an exam like system
amit@thunder
parents:
diff
changeset
|
25 |