X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d42bc478e3d1bd90eb294464748c21e4de0fc63..d4489421ccb20d02ad94d4782478a9a38d438ec5:/src/catalogue/models/book.py?ds=inline diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 9116a4657..5dbda4770 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -237,6 +237,12 @@ class Book(models.Model): @staticmethod def format_audio_length(seconds): + """ + >>> Book.format_audio_length(1) + '0:01' + >>> Book.format_audio_length(3661) + '1:01:01' + """ if seconds < 60*60: minutes = seconds // 60 seconds = seconds % 60