Module Import alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults vararg kwarg body Assign NameStore Dict Str Str Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Call NameLoad Call NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad Call NameLoad NameLoad NameLoad attr If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call NameLoad Lambda arguments args NameParam defaults AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareNotIn NameLoad NameLoad CompareIn NameLoad NameLoad body If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad Str TupleLoad NameLoad Dict Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Return decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults body Return decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad Str decorator_list decorator_list Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr If BoolOpAnd NameLoad CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr DictComp AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareIs AttributeLoad NameLoad attr NameLoad body Continue If BoolOpAnd CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr body Continue Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Dict Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore ListLoad For NameStore NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad keyword Str keyword NameLoad If CompareNotEq NameLoad NameLoad body Break orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Expr Str ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Dict Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad Str body Continue AugAssignAdd NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call NameLoad NameLoad Str body Continue For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A N/A abc datetime datetime functools reduce N/A operator django.db models django.db.models.base ModelBase django.db.models query N/A jsonfield N/A six devops.error DevopsError devops.helpers.helpers deepgetattr devops.helpers loader choices N/A N/A N/A args kwargs N/A N/A defaults N/A max_length null 255 False N/A N/A N/A defaults update kwargs N/A N/A N/A defaults update choices N/A list N/A zip args args N/A N/A N/A models CharField defaults N/A BaseModel N/A N/A models Model N/A Meta N/A object N/A N/A abstract True N/A N/A created N/A N/A models DateTimeField default N/A datetime utcnow N/A ParamedModelType N/A ModelBase N/A N/A Metaclass of parameterizable class.

    It implements the following functinality:
    * Automaticlly sets Meta.abstract = True for all derived classes
    except the first one.
    * Initializes :class:`ParamFieldBase` classes with `param_key`.
    * Saves the keys of :class:`ParamFieldBase` attributes in
    `_param_field_names` list.
    * Gives an ability to set :class:`ParamFieldBase` values in
    constructor and combine the with other attributes defined in djano
    model.
    * Automaticlly replaces `instance.__class__` fter creation of
    instance in method `__call__`. It is the major thing to make the
    derived models polymorphic.
     __new__ N/A N/A cls name bases attrs N/A N/A N/A super_new N/A N/A super ParamedModelType cls __new__ N/A N/A N/A name ParamedModel N/A name NewBase N/A N/A parents N/A reduce N/A operator add N/A map N/A N/A N/A a N/A N/A a __mro__ bases N/A N/A N/A ParamedModel bases N/A ParamedModel parents N/A N/A N/A Meta attrs N/A N/A N/A attrs N/A Meta N/A type Meta N/A object N/A N/A Meta N/A attrs N/A Meta N/A N/A Meta proxy True N/A new_class N/A super_new cls name bases attrs N/A N/A new_class _param_field_names N/A N/A attr_name attrs N/A N/A attr N/A attrs N/A attr_name N/A N/A isinstance attr ParamFieldBase N/A N/A N/A N/A attr set_param_key attr_name N/A N/A N/A N/A new_class _param_field_names append attr_name N/A new_class N/A __call__ N/A N/A cls N/A args kwargs N/A N/A kwargs_for_params N/A N/A defined_params N/A N/A cls get_defined_params N/A param defined_params N/A N/A N/A param kwargs N/A N/A N/A kwargs_for_params N/A param N/A N/A kwargs pop param N/A obj N/A N/A N/A super ParamedModelType cls __call__ args kwargs N/A N/A obj _class N/A N/A Cls N/A N/A loader load_class N/A obj _class N/A N/A obj __class__ Cls N/A param kwargs_for_params N/A N/A N/A setattr obj param N/A kwargs_for_params N/A param N/A obj N/A N/A ParamFieldBase N/A object N/A N/A Base class for ParamFields. __init__ N/A N/A self N/A N/A N/A N/A self param_key None N/A set_param_key N/A N/A self param_key N/A N/A N/A N/A self param_key param_key N/A set_default_value N/A N/A self instance N/A N/A N/A N/A N/A abc abstractmethod __get__ N/A N/A self instance cls N/A N/A N/A N/A N/A abc abstractmethod __set__ N/A N/A self instance values N/A N/A N/A N/A N/A abc abstractmethod __delete__ N/A N/A self instance N/A N/A N/A N/A AttributeError Can't delete attribute N/A N/A N/A N/A six add_metaclass N/A abc ABCMeta ParamField N/A ParamFieldBase N/A N/A Field class.

    This class implemets routine of using json field as a storage.
    e.g. if you define a field with name "foo" then its value will be
    stored in `params` json field as {'foo': 'value'}. This class
    allows to avoid direct access to json field and it hides the routine.

    Additionally it gives an ability:
    * to set default value.
    * to limit values using a list of allowed values.

    Examples of ussage::

        class A(ParamedModel):
            foo = ParamField(default=10)
            bar = ParamField(choices=('a', 'b', 'c'))

        a = A()
        print(a.foo)  # prints 10
        print(a.bar)  # prints None

        a.foo = 5
        a.bar = 'c'
        print(a.params)  # prints {'foo': 5, 'bar': 'c'}

        a.bar = 15  # throws DevopsError
     __init__ N/A N/A self default choices N/A None None N/A N/A N/A N/A N/A super ParamField self __init__ N/A N/A choices N/A default choices N/A N/A N/A DevopsError Default value not in choices list N/A N/A self default_value default N/A N/A self choices choices N/A set_default_value N/A N/A self instance N/A N/A N/A N/A N/A N/A instance params setdefault N/A self param_key N/A self default_value N/A __get__ N/A N/A self instance cls N/A N/A N/A N/A N/A N/A instance params get N/A self param_key N/A self default_value N/A __set__ N/A N/A self instance value N/A N/A N/A N/A N/A self choices N/A value N/A self choices N/A N/A N/A DevopsError N/A N/A {}: Value not in choices list format N/A self param_key N/A N/A N/A instance params N/A N/A self param_key value N/A N/A ParamMultiField N/A ParamFieldBase N/A N/A Field class which stores other fields.

    Acts the same way as :class:`ParamField` but should be used in case
    if you want to use nested fields.

    Examples of ussage::

        class A(ParamedModel):
            foo = ParamMultiField(
                bar=ParamField(default=10),
                baz=ParamField(),
            )

        a = A()
        print(a.foo.bar)  # prints 10
        print(a.foo.baz)  # prints None

        a.foo.bar = 0
        a.foo.baz = 1
        print(a.params)  # prints {'foo': {'bar': 0, 'baz': 1}}
     __init__ N/A N/A self N/A subfields N/A N/A N/A N/A N/A super ParamMultiField self __init__ N/A N/A N/A len subfields 0 N/A N/A N/A DevopsError subfields is empty N/A N/A self subfields N/A N/A N/A name field N/A N/A subfields items N/A N/A N/A N/A isinstance field N/A ParamField ParamMultiField N/A N/A N/A DevopsError N/A N/A field "{}" has wrong type; should be ParamField or ParamMultiField format name N/A N/A N/A field set_param_key name N/A N/A N/A N/A self subfields append field N/A N/A self choices None N/A N/A self _proxy None N/A N/A self proxy_fields N/A N/A field param_key field N/A field N/A self subfields N/A Proxy N/A type ParamMultiFieldProxy N/A object N/A self proxy_fields N/A N/A self _proxy N/A Proxy N/A set_default_value N/A N/A self instance N/A N/A N/A field N/A self subfields N/A N/A N/A N/A self _init_proxy_params instance N/A N/A N/A field set_default_value N/A self _proxy N/A _init_proxy_params N/A N/A self instance N/A N/A N/A N/A N/A N/A instance params setdefault N/A self param_key N/A dict N/A N/A N/A self _proxy params N/A N/A instance params N/A N/A self param_key N/A __get__ N/A N/A self instance cls N/A N/A N/A N/A N/A self _init_proxy_params instance N/A N/A self _proxy N/A __set__ N/A N/A self instance values N/A N/A N/A N/A N/A isinstance values dict N/A N/A N/A DevopsError Can set only dict N/A N/A N/A self _init_proxy_params instance N/A N/A field_name field_value N/A N/A values items N/A N/A N/A field_name N/A self proxy_fields N/A N/A N/A DevopsError N/A N/A Unknown field "{}" format field_name N/A N/A setattr N/A self _proxy field_name field_value N/A N/A ParamedModelQuerySet N/A N/A query QuerySet N/A N/A Custom QuerySet for ParamedModel __get_all_field_names N/A N/A self N/A N/A N/A field_names N/A set N/A _meta N/A N/A self model _meta N/A fields N/A N/A _meta get_fields N/A field fields N/A N/A N/A N/A field is_relation N/A field many_to_one N/A N/A field related_model None N/A N/A N/A N/A N/A N/A field model N/A _meta model N/A N/A N/A N/A field model _meta concrete_model N/A _meta concrete_model N/A N/A N/A N/A N/A field_names add N/A field name N/A N/A hasattr field attname N/A N/A N/A N/A field_names add N/A field attname N/A field_names N/A filter N/A N/A self N/A args kwargs N/A N/A super_filter N/A N/A super ParamedModelQuerySet self filter N/A kwargs_for_params N/A N/A db_kwargs N/A N/A field_names N/A N/A self __get_all_field_names N/A param N/A N/A kwargs keys N/A N/A first_subparam N/A N/A N/A param split __ N/A 0 N/A N/A first_subparam field_names N/A N/A N/A kwargs_for_params N/A param N/A kwargs N/A param N/A N/A N/A db_kwargs N/A param N/A kwargs N/A param N/A queryset N/A super_filter args db_kwargs N/A N/A kwargs_for_params N/A N/A queryset N/A result_ids N/A N/A item queryset N/A N/A N/A key value N/A N/A kwargs_for_params items N/A N/A item_val N/A deepgetattr item key splitter __ do_raise True N/A N/A item_val value N/A N/A N/A N/A N/A N/A result_ids append N/A item id N/A N/A super_filter id__in result_ids N/A N/A ParamedModelManager N/A N/A models Manager N/A N/A Manager for ParamedModel N/A use_for_related_fields True get_queryset N/A N/A self N/A N/A N/A N/A ParamedModelQuerySet N/A self model using N/A self _db N/A N/A ParamedModel N/A N/A N/A six with_metaclass ParamedModelType N/A models Model N/A N/A Parameterizable class

    This class allows all derived classes to be polymorphically extended
    by extra fields by using :class:`ParamField` and :class:`ParamMultiField`.
    First derived class of :class:`ParamModel` must be non-abstract to
    create a real database table and all subsequent derived classes are
    atomaticlly marked as abstract by :class:`ParamedModelType`. This is
    made to avoid creation of db tables for derived classes. See mode
    info about how it is implemented in metaclass :class:`ParamedModelType`.

    The class has two fields:
    * params - this is a jsonfield where all extra fields are stored and
               serialized to json string when the instance is saved to db
    * _class - a :class:`ParamField` which stores path to the derived
               class. It allows to load the same derived class after
               loading data from db.
     Meta N/A object N/A N/A abstract True N/A N/A objects N/A ParamedModelManager N/A params N/A N/A jsonfield JSONField default N/A N/A _class N/A ParamField get_defined_params N/A N/A cls N/A N/A N/A param_names N/A N/A basecls N/A cls __mro__ N/A N/A N/A N/A hasattr basecls _param_field_names N/A N/A N/A param_names N/A basecls _param_field_names N/A param_names N/A classmethod set_default_params N/A N/A self N/A N/A N/A basecls N/A N/A self __class__ __mro__ N/A N/A N/A N/A hasattr basecls _param_field_names N/A N/A N/A param N/A basecls _param_field_names N/A N/A N/A N/A N/A N/A basecls __dict__ N/A param set_default_value self N/A save N/A N/A self N/A args kwargs N/A N/A N/A self _class N/A N/A loader get_class_path self N/A N/A N/A self set_default_params N/A N/A N/A N/A super ParamedModel self save args kwargs N/A N/A