Answer the question
In order to leave comments, you need to log in
How to add photo to django admin panel after publishing?
I plan to publish a site on a hosting.
I now have photos added from the media folder
How can I make it possible to add photos from the computer to the admin panel after publication?
models.py:
class Member(models.Model):
name = models.CharField(max_length=60, verbose_name="имя")
surname = models.CharField(max_length=60, verbose_name="фамилия")
post = models.CharField(max_length=60, verbose_name="должность")
img = models.ImageField(verbose_name="картинка", upload_to="media/imgs", null=True)
def __str__(self):
return self.name
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question