Returns the date of the last modified Note or Release.

    For use with Django's last_modified decorator.

def get_last_modified_date(*args, **kwargs):
    """Returns the date of the last modified Note or Release.

    For use with Django's last_modified decorator.
    """
    try:
        latest_note = Note.objects.latest()
        latest_release = Release.objects.latest()
    except ObjectDoesNotExist:
        return None

    return max(latest_note.modified, latest_release.modified)