Bhai can you please create a video for image slider(carousel) in django that fetches images from database? If you are unable to create then can you please provide any code for doing the same, please help
@PythonBricks4 жыл бұрын
you can never store the media in db .. media is stored in storage or on cloud you can use django image field for your need in settings.py MEDIA_ROOT = os.path.join(BASE_DIR,"media") MEDIA_URL = "/media/" in urls.py from django.conf import settings from django.conf.urls.static import static urlpatterns = [ .... ]+static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) in models.py create a model having image field grab the model object in views and render to a template in template.. This will show the image.. on template .. and you can put this img tag in a slider we will upload the video on this very soon.. thnks.. for your interest in our content...
@shivamjha32004 жыл бұрын
@@PythonBricks yes please upload a video for it. I did the same but the image slider was not working. I'm waiting fir the video