Ejemplo n.º 1
0
# from djangoautoconf.auto_conf_admin_tools.foreign_key_auto_complete import ForeignKeyAutoCompleteFeature
from djangoautoconf.auto_conf_admin_tools.reversion_feature import ReversionFeature
from djangoautoconf.auto_conf_admin_tools.admin_register import AdminRegister
import models


managed_item_admin_register = AdminRegister()
managed_item_admin_register.add_feature(ReversionFeature())
managed_item_admin_register.register_all_models(models)
Ejemplo n.º 2
0
# f = ForeignKeyAutoCompleteFeature()
# # h = FilterHorizontalFeature(('descriptions', 'relations'))
# f.set_search_field_by_model({UfsObj: ("uuid", "ufs_url", "full_path")})
# r.add_feature(f)
# r.add_feature(h)
# h = AdminAttrFeature({"filter_horizontal": ("descriptions", )})
# raw = AdminAttrFeature({"raw_id_fields": ("relations",)})
# r.add_feature(raw)
# r.add_feature(h)
a = AdminAttrFeature({"form": make_ajax_form(UfsObj, {"relations": "ufs_obj",
                                                      "parent": "ufs_obj",
                                                      "descriptions": "description"}),
                      "list_filter": ('source', 'ufs_obj_type')
                      })

r.add_feature(a)
r.add_feature(ReversionFeature())
r.add_feature(AdminTaggingFeature())
r.register(UfsObj)


r = AdminRegister()
r.add_feature(ReversionFeature())
r.register_all_models(models)


# obj_sys_admin_site = get_admin_site("ObjSysAdminSite")
#
# r = AdminRegister(admin_site_list=[obj_sys_admin_site], feature_list=[])
# a = AdminAttrFeature({"form": make_ajax_form(UfsObj, {"relations": "ufs_obj",
#                                                       "parent": "ufs_obj",
Ejemplo n.º 3
0
from djangoautoconf.auto_conf_admin_tools.admin_register import AdminRegister
from djangoautoconf.auto_conf_admin_tools.reversion_feature import ReversionFeature

import models
factory = AdminRegister()
factory.add_feature(ReversionFeature())
factory.register_all_model(models)

# from reversion.helpers import patch_admin
#
# patch_admin(models.BookingRequest)
# patch_admin(models.BookableResource)


from reversion import models

factory.register_all_model(models)