]>
git.ipfire.org Git - ipfire.org.git/blob - www/webapp/banners.py
6 from helpers
import Item
, _stringify
9 def __init__(self
, filename
=None):
15 def load(self
, filename
):
20 for item
in simplejson
.loads(data
):
21 self
.items
.append(Item(**_stringify(item
)))
24 return random
.choice(self
.items
)
27 banners
= Banners("banners.json")