Functions and Methods¶
What follows is a description of the functions and methods that can be used on the various modules and classes in DColumn.
Models and Managers¶
DynamicColumnManager¶
Method Name |
Arguments |
Description |
---|---|---|
get_fk_slugs |
None |
Returns all dynamic column slugs that have a value_type of CHOICE. These include all Django models and the pseudo models. |
DynamicColumn¶
Method Name |
Arguments |
Description |
---|---|---|
relation_producer |
None |
Returns a string of the relation if any for this instance. Used in the admin. |
collection_producer |
None |
Returns a list of the collection names for this instance. Used in the admin. |
get_choice_relation _object_and_field |
None |
Returns a tuple of the model object and the field used in the HTML select option. |
ColumnCollectionManager¶
Method Name |
Arguments |
Description |
---|---|---|
get_column_collection |
name |
A positional argument. The name of the column collection. |
unassigned |
Keyword argument defaults to False, if True gets the items that are assigned to the collection name plus any unassigned items. |
|
Returns a column collection. |
||
serialize_columns |
name |
A positional argument. The name of the column collection. |
obj |
A keyword argument that defaults to
None otherwise an instance of a
|
|
by_slug |
A keyword argument that defaults to
False causing keys to be a |
|
Returns a serialized version of the dynamic columns. |
||
get_active_relation _items |
name |
A positional argument. The name of the column collection. |
Returns a list of dynamic columns
that have a value_type of
|
||
get_collection_choices |
name |
A positional argument. The name of the column collection. |
use_pk |
A keyword argument defaults to
False, if True returns the
|
|
Returns a list of tuples that can be used for HTML select options. |
ColumnCollection¶
Method Name |
Arguments |
Description |
---|---|---|
process_dynamic_columns |
dcs |
A list of |
No return value. |
CollectionBaseManagerBase¶
Method Name |
Arguments |
Description |
---|---|---|
model_objects |
active |
A keyword argument. This value if
|
Returns a Django queryset. |
||
get_choices |
field |
A positional argument. This value is the field in a model or pseudo model that is used in the list of choices. |
active |
A keyword argument. This value if
|
|
comment |
A keyword argument. This value if
|
|
sort |
A keyword argument. This value if
|
|
Returns a list of tuples that can be used for HTML select options. |
||
get_value_by_pk |
pk |
A positional argument. This value is
the |
field |
A positional argument. This value is the field on a model or pseudo model that a value is returned from. |
|
Returns the value from the |
||
get_all_slugs |
None |
Returns a list of all slugs. |
get_all_fields |
None |
Returns a list of all model fields. |
get_all_fields_and_slugs |
None |
Returns a list of all model fields and slugs. |
CollectionBase¶
Method Name |
Arguments |
Description |
---|---|---|
serialize_key_values |
by_slug |
A keyword argument. This value if
|
Returns a dictionary of |
||
get_dynamic_column |
slug |
A positional argument. This slug
represents any instance of a
|
Returns the DynamicColumn instance relitive to this model instance. |
||
get_key_value |
slug |
A positional argument. This value
represents any |
field |
A keyword argument indicating the
field to use in a model or pseudo
model. Defaults to |
|
choice_row |
Only works with |
|
Returns the coersed value of a
|
||
save_deferred |
None |
Saves the |
set_key_value |
slug |
A positional argument. This value
represents any |
value |
A positional argument. Can be the
actual value to set in a |
|
field |
A keyword argument, indication the
field used in a model or pseudo model.
Defaults to |
|
obj |
A |
|
force |
A keyword argument. The default is
|
|
defer |
Defer saving the KeyValue record.
|
|
No Return value. Sets a value on a
|
KeyValueManager¶
There are no user methods on the KeyValueManager model manager at this time.
KeyValue¶
There are no user methods on the KeyValue model at this time.
DynamicColumnManager¶
This is not the same model manager that was mentioned above. The DynamicColumnManager holds all the relevant states of the system and should be the first place you come when you need to know something about the system.
Method Name |
Arguments |
Description |
---|---|---|
register_choice |
choice |
A positional argument. This can be either a Django model or pseudo model class object. |
relation_num |
A positional argument. This value is a numeric identifier used as the HTML select option value. |
|
field |
A positional argument. This value is a string used as the HTML select option text value. |
|
No return value. |
||
choice_relations |
Property |
Returns a list of choices. |
choice_relation_map |
Property |
Returns a dictionary of choices. |
choice_map |
Property |
Returns a dictionary where the key is the Django or pseudo model name and the value is a tuple of the choice model object and the relevant field name. |
register_css_containers |
container_list |
A positional argument and is a list of the CSS classes or ids that will determine the location on the page of the various dynamic columns. |
No returns value. |
||
css_containers |
Property |
Returns a list of tuples where the tuple is (num, text). |
css_container_map |
Property |
Returns a dictionary of the CSS containers. |
get_collection_name |
model_name |
A positional argument. The name of the column collection. |
Returns the
|
||
get_api_auth_state |
Property |
Returns the value of
|
get_related_object_names |
choose |
If |
Returns values for a drop down menu. |
||
get_relation_model_field |
relation |
A positional argument and is
the value in the
|
Returns the field used in the HTML select option text value. |