djangosnippets.org: Latest snippets tagged with 'image field'http://djangosnippets.org/tags/image-field/2012-01-08T15:14:18.446402-06:00Save image in field
2012-01-08T15:14:18.446402-06:00grillermohttp://djangosnippets.org/snippets/2641/<p>Small function that i use to save files to an imagefield, the file can be either an url or a file.
This function has the following requirements.
import requests
from django.core.files import File
from django.core.files.temp import NamedTemporaryFile
from django.conf import settings</p>
<p>Get the awesome requests library: pip install requests
This …</p>
Freely redistributable