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
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.
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
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
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
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
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
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
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
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
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
11 matches
Mail list logo