MyCoServer/mycoserver/templates/helpers.py

15 lines
242 B
Python
Raw Normal View History

2014-01-12 01:33:07 +01:00
# -*- coding: utf-8 -*-
import os
import random
import datetime
def random_sequence(length):
return [random.random() for idx in xrange(0, length)]
def relative_path(ctx, abs_path):
return os.path.relpath(abs_path, ctx.req.path)