Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #50

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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