Django pillow resize image on upload4/21/2023 In upload.html, we shall load the statics at the top, then add the background image in the body tag. The background image that we use is bj.jpg. To do so, we shall create a directory named static in our app-level directory demo, and add the background image that you intend to use inside it. ![]() We shall go on and add a background image to our upload template. width > 300:Īdd a background image in a Django template In your command line, create a new directory for our project and name it Images as shown:įrom import mark_safeįrom PIL import Image as Im # new # Create your models here. We shall start by setting up the development environment for our Django project.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |