def getURL(date, slug, type='post'):
  '''Create a URL string for a page or post.'''
  if date == None or type != 'post':
    return '/%s/'%(slug)
  return '/%04d/%02d/%02d/%s/'%(date.year, date.month, date.day, slug)
dataset/ETHPy150Open DeanCutlet/filestack/util.py/getURL/original