Re: django fetch files

2022-08-28 Thread Hind Djebbar
yeah it's file [image: image_2022-08-28_195920212.png]

Le dimanche 28 août 2022 à 19:55:52 UTC+2, dashlaksh...@gmail.com a écrit :

> If you don't get it you can share the code with met at 
> dashlaksh...@gmail.com .
>
> Thanks and regards
> Lakshyaraj Dash
>
> On Sun, Aug 28, 2022, 23:17 Hind Djebbar  wrote:
>
>> can anyone helps me please it does not work  
>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/0e99a673-0e5a-4539-ba9b-1b8e55a15544n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/0e99a673-0e5a-4539-ba9b-1b8e55a15544n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b3c9441c-f1f3-4340-b356-2583fff03d78n%40googlegroups.com.


django fetch files

2022-08-28 Thread Hind Djebbar
can anyone helps me please it does not work 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e99a673-0e5a-4539-ba9b-1b8e55a15544n%40googlegroups.com.


get files name

2022-08-27 Thread Hind Djebbar
how can i get the file names from data base to list them into droplist 
in models.py :
class FilesUpload(models.Model):
file = models.FileField(null=True, blank=True,upload_to="media/")
def filename(self):
name = os.path.basename(self.file.name)
return name

 in views.py :
def File_List(request):
List=FilesUpload.objects.all()
return render(request,"Espace_user\Espace_user.html",{'fichier':List})

in html file: 

  {% for f in fichier %} 
  {{ f.file.filename }}
  {% endfor %}  
   

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d665f774-f7fd-4a26-af9f-c3f4bb12fe0cn%40googlegroups.com.