]>
git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - www/webapp/menu.py
5 from helpers
import Item
8 def __init__(self
, filename
=None):
14 def load(self
, filename
):
19 for item
in simplejson
.loads(data
):
20 self
.items
.append(MenuItem(**item
))
24 def __init__(self
, **args
):
25 Item
.__init
__(self
, **args
)
29 if self
.args
.has_key("subs"):
30 self
.args
["items"] = []
31 for sub
in self
.args
["subs"]:
32 self
.args
["items"].append(MenuItem(**sub
))
36 if __name__
== "__main__":
38 print [i
.args
for i
in m
.items
]