Skip to content

Commit

Permalink
Merge pull request #50 from jackton1/cleaned-up-readme
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
jackton1 authored Dec 13, 2019
2 parents 20e7d8e + eacb836 commit 24c6d42
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,28 @@ Out[10]: <QuerySet [<Tag: men>, <Tag: women>]>

#### CloneMixin attributes

- Explicit field names required

```text
_clone_model_fields: Restrict the list of fields to copy from the instance (By default: Copies all
non-unique/auto created/editable model fields).
_clone_many_to_many_fields: Restricted Many to many fields (i.e Test.tags).
_clone_many_to_one_or_one_to_many_fields: Restricted Many to One/One to Many fields.
_clone_one_to_one_fields: Restricted One to One fields.
```
- Explicit field names required.
***

`_clone_model_fields`: Restrict the list of fields to copy from the instance
(By default: Copies all fields excluding auto created/non editable model fields).

`_clone_many_to_many_fields`: Restricted Many to many fields (i.e Test.tags).

`_clone_many_to_one_or_one_to_many_fields`: Restricted Many to One/One to Many fields.

`_clone_one_to_one_fields`: Restricted One to One fields.

- Implicit include all except these fields.
***
`_clone_excluded_model_fields`: Excluded model fields.

`_clone_excluded_many_to_many_fields`: Excluded many to many fields.

`_clone_excluded_many_to_one_or_one_to_many_fields`: Excluded Many to One/One to Many fields.

`_clone_excluded_one_to_one_fields`: Excluded one to one fields.

```text
_clone_excluded_model_fields (list): Excluded model fields.
_clone_excluded_many_to_many_fields (list): Excluded many to many fields.
_clone_excluded_many_to_one_or_one_to_many_fields (list): Excluded Many to One/One to Many fields.
_clone_excluded_one_to_one_fields (list): Excluded one to one fields.
```

> :warning: NOTE: Ensure to either set `_clone_excluded_*` or `_clone_*`. Using both would raise errors.
Expand Down

0 comments on commit 24c6d42

Please sign in to comment.