Answer the question
In order to leave comments, you need to log in
Working with images in django?
1) There are 2 models Products and Images_Products Images_Products
are linked by key one-to-many with products one product can have many images
So how to combine so that you can immediately add products together with images in the admin panel?
2) As I understand it, I create my own url for each picture with this code
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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