I suggest you to follow this answer
Need a minimal Django file upload example
and it is better that your upload file go to a different directory than static but if you want to upload it to this directory:
class ProdcutImage(models.Model):
product = models.ForeignKey(Product)
image = models.ImageField(upload_to = "static/images/products" )
settings.py
import os
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
MEDIA_ROOT = PROJECT_ROOT + '/static/images/products/'
MEDIA_URL = '/media/' #put whatever you want that when url is rendered it will be /media/imagename.jpg
and in urls.py
from django.conf.urls.static import static
from django.conf import settings
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) #at the end