Ajout Document.get_url()
This commit is contained in:
parent
973e312de0
commit
af17ed0d46
4 changed files with 8 additions and 3 deletions
|
|
@ -73,3 +73,8 @@ class Document(models.Model):
|
|||
|
||||
def __str__(self):
|
||||
return f"{self.titre} {self.quand}"
|
||||
|
||||
def get_url(self):
|
||||
if self.url:
|
||||
return self.url
|
||||
return self.fichier.url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue