Hi Karen, Rasjeh,
The mulipart/dorm-data encoding type is set, so that shouldnt be it.
Here's the code I'm using
*** form ***
class UploadForm(forms.Form):
'''
choices for quering assets
'''
doc_scope = [(i.long_name, i.long_name) for i in
DocumentType.objects.all()]
theme_scope = [(i.long_name, i.long_name) for i in
Theme.objects.all()]
doctype = forms.ChoiceField( choices=doc_scope,
label='Set the document
type',
required=True,
#initial='all projects',
)
theme = forms.ChoiceField( choices=theme_scope,
required=True,
label='Set the theme ',
)
comment = forms.CharField( max_length=100,
required=False,
widget=forms.Textarea,
label='Optional: Comment the
file if you like'
)
upload_file = forms.FileField(required=False) # should be True,
that's the issue at hand
upload_img = forms.ImageField(required=False, label='Optional:
Upload an image if you\'d like to comment visually')
img_text = forms.CharField(required=False, label='Optional:
Hover text for the image')
*** template ***
<table class="upload_form" align="center" width="800">
{% if form.is_multipart %}
<form action="{{path}}" method="POST" enctype="multipart/form-
data" >
{% else %}
<form action="{{path}}" method="POST" align="center">
{% endif %}
{{form.as_table}}
<br>
<td align="center" colspan="2">
<input type="submit" value="Submit"/>
</td>
<table/>
</form>
Note that {{path}} == request.path
Thanks for looking over my shoulders ;')
-jelle
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---