I currently have this:
class youtube_video(models.Model):
video_url = models.CharField(max_length=150,blank=True, validators=[RegexValidator("^.*((v\/)|(embed\/)|(watch\?))\??v?=?(?P<vid_id>[^\&\?]*).*")])
video_thumbnail = models.ImageField(upload_to="/thumbs")
def save(self, args*, kwargs**):
video_thumbnail = urllib2.urlretrieve(#trivial regex here that gets the thumbnail url from the video_url)
super(youtube_video, self).save(*args, **kwargs)
This isn't working, but hopefully it demonstrates what I'm trying to do. Essentially I want to autopopulate the video_thumbnail
ImageField
upon the model saving, using another field in the model.