def init_dicts(): global DICTS logging.info("init dicts") inflect_list = Inflect.list() DICTS = dict() for i in inflect_list: dict_key = "%s_%s" % (i.gender, i.part) if not dict_key in DICTS: DICTS[dict_key] = InflectDict() DICTS[dict_key].add(i.pattern, i.proposal)
def index(request): inflect_list=Inflect.list() return render_to_response('admin/inflects_index.html', RequestContext(request, { 'inflect_list': inflect_list }))