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