class Thing(models.Model):
name = models.CharField(blank=False, null=False, maxlength=30)
photo = models.ImageField(upload_to='images/things/', blank=True,
null=True)
class ThingForm(forms.Form):
name = forms.CharField(max_length=30, required=True, label=_('Name
of the thing'))
photo = forms.Field(widget=forms.FileInput, required=False,
label=_('Photo')
i wrote this code to upload image
when i save this code .. it is showing an I/O warning :
non-ascii found, yet no encoding declared.Add a link like
# -*- coding: cp1252 -*-
to your file
click ok to save this file as cp1252
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---