Răsfoiți Sursa

Please enter the commit message for your changes. Lines starting
with '' will be ignored, and an empty message aborts the commit.

Committer: Mauro <mauro@Endor>

On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
modified: utente/views.py

alla cancellazione del documento nel db va rimosso anche il file fisico.

Mauro 1 an în urmă
părinte
comite
a28016f401
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      utente/views.py

+ 2 - 0
utente/views.py

@@ -130,6 +130,8 @@ def edit(request):
       documento = request.POST['DeleteDocument']
       print('documento da rimuovere',documento)
       d = Documento.objects.get(pk=documento)
+      # dobbiamo modificare il codice in modo che possa venir rimosso anche il file fisico,
+      # altrimenti restano un mare di cadaveri
       if d:
        d.delete()