def get(self, id): category = model.Category().get(id) if category: locales = model.Locale().find().get(100) form = self.form(category["model_id"]) self.render( "admin/content_save.html", locales=locales, category=category, editor="editor_base", aid=False, form=form.getConfig(), )
def get(self, id, aid, cid): category = model.Category().get(id) if category: locales = model.Locale().find().get(100) form = self.form(category["model_id"]) ar = model.Category().getModel(id) data = ar.where("category_has_article_id = ?", cid).get(100) self.render( "admin/content_save.html", locales=locales, category=category, data=data, editor="editor_base", aid=aid, form=form.getConfig(), )