Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
75 views

I'm working on a Django project where I'm trying to handle file uploads, but I'm encountering some issues. The uploaded files are missing, and I don't have the full path to the media files. Here's ...
Youssef Elhormi's user avatar
0 votes
1 answer
55 views

I tried to show an image on my web, which I uploaded from the admin panel hand by using Django. I was expecting to see my image on the web site, but instead it only showed the little img icon, and ...
Mehmet Eren EFEGİL's user avatar
0 votes
1 answer
50 views

I need to serve media in Django in production mode and it is very little need to serve telegram user photos in Django admin. so I know everything about Django it's not for serving files or media so ...
minttux's user avatar
  • 435
1 vote
1 answer
76 views

I am currently working my way through a django project and am having trouble working with MEDIA and uploading an graph image. Inside settings.py, I have added the below code. MEDIA_URL = '/media/' ...
Lance Van Elzen's user avatar
0 votes
1 answer
57 views

I'm doing a e-learning portal using Django. The user 'teacher' should be able to upload files under any course. However, the files are not being upload in media/course_materials folder. When i check ...
semma's user avatar
  • 1
2 votes
3 answers
1k views

I've looked into many articles and videos on this topic, but either I didn't understand or the solutions were insufficient. I would be very happy if you could help. I developed a Django project and ...
Bedirhandd's user avatar
-1 votes
1 answer
40 views

What i want is that when user fills up the registration form and upload his pic , in want that pic to be show on index.html page but its not showing up there so please help me guys all the images are ...
alfaprogramer's user avatar
0 votes
1 answer
220 views

I am stuck with a server 500 server error at a form only when it is about to save the pictures (the rest of the forms belonging to other models are saved in the db ok) I didn't have the problem in ...
Alvar's user avatar
  • 37
0 votes
2 answers
35 views

I am trying to send POST to my database through POSTMAN and I get 404 not Found status. Here is my views and urls. #views `class PlantViewSet(ModelViewSet): queryset = Plant.objects.all() ...
Sk09's user avatar
  • 23
0 votes
1 answer
66 views

I am currently facing a problem with trying to migrate a Django Image field from a folder named media_root located inside a folder named static_cdn inside of my current project here is what my current ...
KronosHedronos2077's user avatar
0 votes
1 answer
60 views

settings.py MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') template <img src="{{ group_avatar.avatar.url }}" style="width:30%" alt="Group Avatar" ...
Yuriy Lapunov's user avatar
1 vote
1 answer
105 views

I'm trying to make a link to a file path on a Windows server downloadable to the user after they click the file link. My app displays entries from a result of searching a ticket model. The results on ...
Gary Swartz's user avatar
1 vote
2 answers
223 views

I programmed a function where you can download a file from the media folder with the media files depending on the link. The problem is that if you change the path in the link you have access to all ...
FLYAX's user avatar
  • 161
0 votes
1 answer
41 views

index.html <img src="{{beat.image.url}}" class="card-img-top" alt="{{beat.name}}"> settings.py STATIC_URL = '/static/' MEDIA_URL = '/media/' MEDIA_ROOT = os.path....
aircode610's user avatar
0 votes
1 answer
195 views

Page not found (404) “/app/media/products/23/05/01/jeans.jpg” does not exist while delpolying on railway (as i have turned debug on for the exact error) . i get this error when i am trying to open my ...
shafquet's user avatar
0 votes
2 answers
1k views

as Django newby I am strugling to get an image on screen. After reading tons of questions and answers to problems alike, I am only more puzzled, because it looks like I coded the necesary, but I get ...
Nils's user avatar
  • 120
0 votes
0 answers
57 views

In my django project I just want to plot some image which are there in my media folder. Eventhough the path I am seding to my frontend exists and I have verified multiple times if the path is correct. ...
fragger's user avatar
  • 21
0 votes
1 answer
114 views

I have a Django project in which I use wagtail. Now on one page, the user can upload an image and download it later. For the download link, I used following html: <a href="{{file.document....
Ilian Gion Häsler's user avatar
0 votes
1 answer
50 views

If I enter the image manually in the admin panel, it is correct, but if it is entered through the form, it is not saved in the media directory. views.py def profile_additional_info(request): if ...
MK81's user avatar
  • 24
0 votes
1 answer
451 views

I have a django app hosted in railway, when I push the changes to github railway overrides the media folder as well and I lose all my images, is there a way to exclude the media folder from changing? (...
Hakim's user avatar
  • 11
1 vote
1 answer
117 views

I,m working with my first project in Django, And I have a model like that: def get_image_path(instance, filename): category_name_path = instance.category.category_name return f"{...
Kamil's user avatar
  • 15
1 vote
0 answers
106 views

I developed an e-commerce project, and now I am in the production phase in my own domain. Everything works perfect in development server. I'm using white-noise for serving static files in production ...
bailofwZ's user avatar
  • 143
1 vote
2 answers
851 views

So, I'm trying to follow Django documentation about the static files and media files I have a clean Django installation and I want to add the media folder. What I've done? I've changed the urls.py ...
NicoCaldo's user avatar
  • 1,699
0 votes
1 answer
54 views

Making some kind of blog website and can't make homepage to show article images... Images should be uploaded to media/profile_pics , but it just makes profile_pics folder in app folder and uploads ...
StankovicCode's user avatar
1 vote
0 answers
57 views

I`m writing a site on Django and I faced a problem. I have a cv field in the database, in which users can store their resume, I did everything as stated in the documentation. Namely: Create FileField ...
Dimaapp's user avatar
  • 143
0 votes
1 answer
244 views

I need insights on how to upload a file on click of a save button.I have to upload a file and also capture user selections and save them(user selections) in a file when I click on "save". ...
Prasanth Nelli's user avatar
0 votes
0 answers
245 views

So, i have up and running Django server on localhost. There's is a Vue page, whick is authorized and able to fetch models data. If i inspect page, i see that img element have correctly resolved URL, ...
vadim's user avatar
  • 1
0 votes
1 answer
67 views

i'm having trouble displaying images on my Djnago admin page. i read https://stackoverflow.com/questions/2443752/how-to-display-uploaded-images-in-change-list-page-in-django-admin/51181825#51181825 ...
skay138's user avatar
0 votes
1 answer
48 views

Django doesn't show images from ImageField in a template. models.py class Employee(models.Model): emp_name = models.CharField(max_length=200) emp_email = models.EmailField() emp_contact = ...
johann soto's user avatar
0 votes
1 answer
638 views

my friends, this is my first question here. So, I follow the Django documentation and some questions here, but the problem keep happening. I did what was said on other similar questions, like this one,...
Cleiton Oliveira's user avatar
0 votes
0 answers
29 views

I am trying to add images to a post. (Using Django v3.2.5) root_directory/settings.py: BASE_DIR = Path(__file__).resolve().parent.parent ... MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, '...
Tanmay's user avatar
  • 46
0 votes
1 answer
63 views

Does anyone know how to store a clone of the original image to another model on Django. This is my models.py file class blogs(models.Model) title = models.CharField(max_length=100, null=True, ...
WalterW's user avatar
  • 59
1 vote
0 answers
30 views

I'm a noob in Django framework, sorry for misunderstanding in some concepts. Currently, I'm trying to set up a Django app with django-filer. Django filer was installed commonly and migrations were ...
CDRM's user avatar
  • 23
0 votes
3 answers
3k views

I've spent the whole day trying to find a solution for showing the images in the template but I couldn't find any solution to my case. This is my settings STATIC_URL = '/static/' MEDIA_URL = '/media/'...
Islam Fahmy's user avatar
0 votes
1 answer
57 views

I have a Django project where I'm trying to create a card with an image that was uploaded by the user. I keep getting a certain error but I have already done every solution and its still coming up. ...
Dunham's user avatar
  • 81
0 votes
2 answers
3k views

i tried to set media root and media url in but when the debug is false don't return anything settings.py ... DEBUG = False ALLOWED_HOSTS = [ '127.0.0.1', '0.0.0.0', ... ] ... STATIC_URL = ...
user avatar
0 votes
2 answers
322 views

I am trying to create a settings page for user profiles and I have hit a roadblock. I included a profile image inside of my User model and when trying to reference said ImageField in my profile ...
DrGigaByte's user avatar
1 vote
1 answer
1k views

I have a website in production that serves media files properly. Media Setting in settings.py file : MEDIA_URL = 'media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') I have created a media ...
Manoj Kamble's user avatar
0 votes
2 answers
2k views

I'm working on a simple blog, I have this model for the blog post: class BlogPost(models.Model): title = models.CharField(max_length=150, unique=True) body = models.TextField() cover_image ...
Toluwalope's user avatar
0 votes
0 answers
53 views

I am trying to create a website using Django and in my models.py I am using Django's ImageField(upload_to=''), but these files are not being uploaded to their location and I don't know why. That file ...
Jack's user avatar
  • 470
1 vote
1 answer
196 views

I recently started to learn Django but I'm still struggeling with accessing media files. My settings.py file includes the following: STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media')...
David's user avatar
  • 11
2 votes
1 answer
2k views

I have a quite standard Django application with a Vuejs frontend. I have different environments (preprod/dev) in which I have file upload/download features. For files, everything works fine because ...
lbris's user avatar
  • 1,259
1 vote
0 answers
59 views

I can't figure out how to upload an image file in the database per Django rules. I added media roots and media URLs too in my settings.py. I get the error which says: can only concatenate str (not &...
farhan's user avatar
  • 23
1 vote
0 answers
130 views

Using Django, I've deployed my web app to http://159.223.177.51/. To login to see the images, use sof///stackoverflow123 I can see the custom fonts and CSS so I know static is working. However, none ...
stelity's user avatar
  • 51
1 vote
2 answers
589 views

I'm using Django (Django 4.0.3.) with Apache2 to run a webserver and serving media locally. Part of the site is a warehouse item tracker and is working fine, user can upload media (images) to items, ...
Zlowbro's user avatar
  • 41
0 votes
0 answers
461 views

I have connected my Django (DRF) to Gunicorn and Nginx and put it all in docker. When I load mysite.com/admin/ it looks bad, just plain text. So it seems like it does not load any static file. However,...
NIKITOS's user avatar
  • 45
2 votes
1 answer
886 views

I want to save file in automatically created folder related with Employee id_number like: media->employee->attachments->emp001->emp001.pdf models.py from django.db import models ...
Sandun Tharaka's user avatar
2 votes
2 answers
1k views

I have a Django app running on a server and I would like to continue working on it locally with the runserver command. My problem concern the use of common static and media files. The media folder ...
Thomas's user avatar
  • 121
1 vote
2 answers
110 views

I am developing a website with Django, I had a lot of pictures in my project, uploaded from the admin panel and saved in the Media folder which I created for these uploads separately, It was working ...
itsdiy0's user avatar
  • 13
0 votes
1 answer
44 views

So I want the imageField to load a default picture when one is not uploaded by user. When I upload something in the imageField form, they end up in the correct folder. When I want it to load a default ...
boryswnr's user avatar

1
2 3 4 5