For loading images, I'm currently loading images in 2 places, and I'm hoping there is a way to only load it through the admin app.
Right now, I first have to load the file into the filesystem located at /static/img/blogposts and then I load the image as a field to my Blog Model through the admin app:
class Blog(models.Model):
title = models.CharField(max_length=30, unique=True)
headline = models.CharField(max_length=100)
body = models.TextField()
post_date = models.DateField(db_index=True, auto_now_add=True)
category = models.ForeignKey('Category')
views = models.IntegerField(editable=False, null=True, blank=True)
image = models.ImageField(upload_to=get_image_path)
active = models.BooleanField()
Is there a preferred way for me to skip the step of having to manually load the file into the filesystem and have the django admin app handle that step for me? Thanks.