for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from datetime import datetime
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
from flask_babel import format_datetime, format_timedelta
def format_datetime_custom(value):
if value is None:
return 'Not yet'
return format_datetime(value, 'dd.MM.yy HH:mm')
def format_timedelta_custom(value):
now = datetime.utcnow()
return format_timedelta(value - now, granularity='day', add_direction=True)
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.