Skip to content

Instantly share code, notes, and snippets.

@allieus
Created September 20, 2012 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allieus/3754627 to your computer and use it in GitHub Desktop.
Save allieus/3754627 to your computer and use it in GitHub Desktop.
FileInput Widget for iOS6 Safari
class Post(models.Model):
photo = models.ImageField(upload_to='photos/%Y/%m/%d')
class PostForm(forms.ModelForm):
class Meta:
model = Post
widgets = {
'photo': forms.FileInput(attrs={'multiple':'multiple', 'accept':'image/*'}),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment