Exemple #1
0
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())
Exemple #2
0
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())
Exemple #3
0
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())
Exemple #4
0
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())