예제 #1
0
파일: admin.py 프로젝트: JuanBer90/dissoi2
def register(model):
    form_class = movenodeform_factory(model)
    admin_class = admin_factory(form_class)
    admin.site.register(model, admin_class)
예제 #2
0
def register(admin_site, model):
    form_class = movenodeform_factory(model)
    admin_class = admin_factory(form_class)
    admin_site.register(model, admin_class)
예제 #3
0
import datetime

from django.contrib import admin
from treebeard.admin import admin_factory
from treebeard.forms import movenodeform_factory

from treebeard.tests.models import BASE_MODELS

for model in BASE_MODELS:
    form_class = movenodeform_factory(model)
    admin_class = admin_factory(form_class)
    admin.site.register(model, admin_class)