how to Display images other than from static folder.

2022-01-31 Thread ramsha azhar
Gide me Django develpers. I just want to display my pictures that are created each time new. My mages are created in my project folder, not in the static folder. how I display images on the HTML page by using the path of my project folder. views.py def Image_display(request): BASE_DIR = os.pa

Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
you are doing it the wrong way. totally the wrong way. I am not being rude. On Mon, Jan 31, 2022 at 7:42 PM ramsha azhar wrote: > Gide me Django develpers. I just want to display my pictures that are > created each time new. > My mages are created in my project folder, not in the static folder.

Re: how to Display images other than from static folder.

2022-01-31 Thread ramsha azhar
So guide me the write way ... On Mon, 31 Jan 2022, 7:45 pm DJANGO DEVELOPER, wrote: > you are doing it the wrong way. totally the wrong way. I am not being rude. > > On Mon, Jan 31, 2022 at 7:42 PM ramsha azhar > wrote: > >> Gide me Django develpers. I just want to display my pictures that are

Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
tell me what you want to get as a result? do you want to display multiple images on HTML template? On Mon, Jan 31, 2022 at 8:27 PM ramsha azhar wrote: > So guide me the write way ... > > On Mon, 31 Jan 2022, 7:45 pm DJANGO DEVELOPER, > wrote: > >> you are doing it the wrong way. totally the wro

Re: how to Display images other than from static folder.

2022-01-31 Thread Lunga Baliwe
i think you want to use MEDIA_URL, see https://learndjango.com/tutorials/django-file-and-image-uploads-tutorial and also check https://docs.djangoproject.com/en/3.2/topics/files/ static files are things like logos, css and maybe some javascript. On Mon, Jan 31, 2022 at 5:36 PM DJANGO DEVELOPER wr

Re: how to Display images other than from static folder.

2022-01-31 Thread Ammar Mohammed
This topic solves your problem . https://djangocentral.com/managing-media-files-in-django/ Ammar Mohammed Tel: 0113075979 On 31 Jan 2022, 17:36 +0200, DJANGO DEVELOPER , wrote: > tell me what you want to get as a result? do you want to display multiple > images on HTML template? > > On Mon, Jan

Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
have you set up the static files in settings.py ? On Mon, Jan 31, 2022 at 8:49 PM ramsha azhar wrote: > I just want to display the attached Tree.png image on the HTML page but > this image is created each time new according to the user input file. guide > me how to set the path of this mage on a

Re: how to Display images other than from static folder.

2022-01-31 Thread ramsha azhar
yes, I set check the attached settings.py file just want to know In template page how I set the path od back directory folder where tree.png is placed. On Mon, Jan 31, 2022 at 8:55 PM DJANGO DEVELOPER wrote: > have you set up the static files in settings.py ? > > On Mon, Jan 31, 2022 at 8:49 PM

Re: how to Display images other than from static folder.

2022-02-01 Thread ramsha azhar
still, I'm confused, Guide me what to write in views.py to display images on my HTML page. the main problem is how to set this path in views.py file to get image from this path. I jst want to display this tree.pdf file on my html page. Any one tell me what to write in views.py? BASE_DIR = os.path.d

Re: how to Display images other than from static folder.

2022-02-01 Thread RANGA BHARATH JINKA
Hi, Pass the pdf URL as a context variable in the views function. Then you can easily access it in your HTML using jinja templating and HTML anchor tag All the best On Wed, Feb 2, 2022 at 11:03 AM ramsha azhar wrote: > still, I'm confused, Guide me what to write in views.py to display images

Re: how to Display images other than from static folder.

2022-02-01 Thread RANGA BHARATH JINKA
Hi, Please follow this. https://djangocentral.com/managing-media-files-in-django/ You have to store your images in a static media folder by adding the media path in settings.py. This is the recommended way and easy to access the images All the best On Wed, Feb 2, 2022 at 11:30 AM RANGA BHARATH J