Scripts posted recently tagged to random in Kelpi

1- 2 of 2.

Get filtered first element order by random

to random django by kere

# filter elements by selected and randomize that list and take the first one.

cover_values = CoverMap.objects.filter(selected = True).order_by('?')[0]

Binnary random (True/False)

to binnary random zope python by nando.quintana

return (int(str(DateTime()).split('.')[1].split(' ')[0]) > 500)
hits counter