Skip to content

Commit

Permalink
Synced README changes to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and github-actions[bot] committed Aug 12, 2021
1 parent 6b10871 commit 2afcd73
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Create copies of a model instance with explicit control on how the instance shou

* [CloneMixin attributes](#clonemixin-attributes)

* [Explicit](#explicit)
* [Implicit](#implicit)
* [Explicit (include only these fields)](#explicit-include-only-these-fields)
* [Implicit (include all except these fields)](#implicit-include-all-except-these-fields)

* [Creating clones without subclassing `CloneMixin`.](#creating-clones-without-subclassing-clonemixin)

Expand Down Expand Up @@ -217,18 +217,26 @@ Out[10]: 'replica'

### CloneMixin attributes

#### Explicit
| Attribute | Description |
|:------------------------------:|:------------:|
| `DUPLICATE_SUFFIX` | Suffix to append to duplicates <br> (NOTE: This requires `USE_DUPLICATE_SUFFIX_FOR_NON_UNIQUE_FIELDS` <br> to be enabled and supports string fields). |
`USE_DUPLICATE_SUFFIX_FOR_NON_UNIQUE_FIELDS` | Enable appending the `DUPLICATE_SUFFIX` to new cloned instances. |
`UNIQUE_DUPLICATE_SUFFIX` | Suffix to append to unique fields |
`USE_UNIQUE_DUPLICATE_SUFFIX` | Enable appending the `UNIQUE_DUPLICATE_SUFFIX` to new cloned instances. |
`MAX_UNIQUE_DUPLICATE_QUERY_ATTEMPTS` | The max query attempt while generating unique values for a case of unique conflicts. |

#### Explicit (include only these fields)

| Field Names | Description |
| Attribute | Description |
|:------------------------------:|:------------:|
| `_clone_fields` | Restrict the list of fields to copy from the instance (By default: Copies all fields excluding auto-created/non editable model fields) |
`_clone_m2m_fields` | Restricted Many to many fields (i.e Test.tags) |
`_clone_m2o_or_o2m_fields` | Restricted Many to One/One to Many fields |
`_clone_o2o_fields` | Restricted One to One fields |

#### Implicit
#### Implicit (include all except these fields)

| Field Names (include all except these fields.) | Description |
| Attribute | Description |
|:--------------------:|:-----------:|
| `_clone_excluded_fields` | Excluded model fields. |
`_clone_excluded_m2m_fields` | Excluded many to many fields. |
Expand Down

0 comments on commit 2afcd73

Please sign in to comment.