def admin_category_edit(id): if logged_in(request): if saved(request): Category().update(request.GET) redirect('/admin/category') else: return template('admin/category/edit', types = Category().types(), category = Category().by_id(id), parents = Category().all())
def admin_category_new(): if logged_in(request): if saved(request): Category().create(request.GET) redirect('/admin/category') else: return template('admin/category/new', types = Category().types(), parents=Category().all())
def admin_category_new(): if logged_in(request): if saved(request): Category().create(request.GET) redirect('/admin/category') else: return template('admin/category/new', types=Category().types(), parents=Category().all())
def admin_category_edit(id): if logged_in(request): if saved(request): Category().update(request.GET) redirect('/admin/category') else: return template('admin/category/edit', types=Category().types(), category=Category().by_id(id), parents=Category().all())