This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://github.com/jtushman/human_dates | |
from datetime import datetime | |
from django.template.defaultfilters import pluralize | |
def prettyinterval(time=None): | |
""" | |
Take a datetime object and return a pretty string like 'in an hour', | |
'tomorrow', 'in 3 months', 'just now', etc | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# project/app/admin/__init__.py | |
from admin import * |