0
Broken image on my Django website
I created a Django website, everything works fine on my local server except for the images, it doesn't display and appears to be broken. How can I correct this pls? Below is link to the project repository on my GitHub account. https://github.com/Chibest01/PyShop
12 Answers
+ 2
This?
Image_url = models.Charfield(max_length-2083)
I think you have to upload the images into the model to use the images.
https://djangocentral.com/uploading-images-with-django/
https://www.javatpoint.com/django-image-upload
+ 1
You're not really giving us any information to go off of besides the question. Do you have any code that deals with this image to share?
+ 1
Put the link in the body of your question. chibuzor obiefuna
0
Justice how do you want me.to share the code here, it's in a file on my desktop and you know it's a project not some small lines of code that I can easily copy and paste here.
0
chibuzor obiefuna Then how were you expecting to get an answer to your question?
Also, you don't always have to show whole code files. You can show a snippet just incase there's a syntax error you are not seeing, or you can share your code through a public github repository.
Otherwise, I do not understand how you expect to get help with code if you aren't showing the code in any form. That would be like asking the dentist for help with pain and expecting him to treat you without showing your teeth.
0
Justice I have uploaded it to GitHub but haven't gotten any replies to the question, is there a way I can share the GitHub link here, I am a beginner that's why I am having issues with it.
0
@okay thank you
0
I looked in your project folder. I didn't find any images. đ€· Where is the file that reference the images and where are the images stored?
0
Chris Coder I added the image url through the admin page and it's referenced in my model. From the tutorials I was learning from there wasn't any separate file for image.
0
Mirielle pls do you have any YouTube video recommendation to learn this?
0
Chris Coder pls can you recommend a YouTube tutorial video on it.