upload/form.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Wed, 02 Sep 2009 11:19:12 -0400
changeset 10 aa30740e6e31
parent 1 6d3b60546075
permissions -rw-r--r--
Added CSS files.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     1
from django import forms
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     2
from django.utils.translation import ugettext_lazy as _
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     3
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     4
attrs_dict = { 'class': 'required' }
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     5
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     6
#form for file field, lets you upload file
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     7
class FileForm(forms.Form):	
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     8
	file = forms.FileField()
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     9
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    10
#form for creating a editable box, out of the content of the file
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    11
class Uploaded_fileForm(forms.Form):
6d3b60546075 Added upload file handler.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    12
	content = forms.CharField(widget=forms.Textarea(attrs=attrs_dict),label=_(u'content'))