Skip to content

Commit

Permalink
Updated README.md (#764)
Browse files Browse the repository at this point in the history
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 26, 2023
1 parent 9b2866e commit e9bbf02
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,23 @@ This solves the problem introduced by using `instance.pk = None` and `instance.s
* [Subclassing the `CloneModel`](#subclassing-the-clonemodel)
* [Using the `CloneMixin`](#using-the-clonemixin)
* [Duplicating a model instance](#duplicating-a-model-instance)
* [Bulk cloning a model](#bulk-cloning-a-model)
* [Multi database support](#multi-database-support)
* [Bulk cloning a model](#bulk-cloning-a-model)
* [Creating clones without subclassing `CloneMixin`.](#creating-clones-without-subclassing-clonemixin)
* [CloneMixin attributes](#clonemixin-attributes)
* [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)
* [Django Admin](#django-admin)
* [Duplicating Models from the Django Admin view.](#duplicating-models-from-the-django-admin-view)
* [List View](#list-view)
* [Change View](#change-view)
* [CloneModelAdmin class attributes](#clonemodeladmin-class-attributes)
* [Advanced Usage](#advanced-usage)
* [Signals](#signals)
* [pre\_clone\_save, post\_clone\_save](#pre_clone_save-post_clone_save)
* [Clone Many to Many fields](#clone-many-to-many-fields)
* [Using the `CloneModel`](#using-the-clonemodel)
* [Using the `CloneMixin`](#using-the-clonemixin-1)
* [Multi database support](#multi-database-support)
* [Compatibility](#compatibility)
* [Running locally](#running-locally)
* [Found a Bug?](#found-a-bug)
Expand All @@ -54,7 +58,6 @@ This solves the problem introduced by using `instance.pk = None` and `instance.s

![](https://user-images.githubusercontent.com/17484350/221386740-aa66df70-eed0-40ed-9c5f-1d3b6c9045c2.png)


## Usage

### Subclassing the `CloneModel`
Expand Down Expand Up @@ -83,7 +86,6 @@ This solves the problem introduced by using `instance.pk = None` and `instance.s
![](https://user-images.githubusercontent.com/17484350/221385171-add1a0c3-21fc-4c48-bfe9-4f2014ffe035.png)


### CloneMixin attributes

| Attribute | Description |
Expand Down Expand Up @@ -117,14 +119,12 @@ This solves the problem introduced by using `instance.pk = None` and `instance.s
>
> * Ensure to either set `_clone_excluded_*` or `_clone_*`. Using both would raise errors.

### Django Admin

#### Duplicating Models from the Django Admin view.

![](https://user-images.githubusercontent.com/17484350/221386874-047989a4-ae4d-4d82-9ef6-2b303001a4c2.png)


##### List View

![Screenshot](Duplicate-action.png)
Expand All @@ -137,7 +137,6 @@ This solves the problem introduced by using `instance.pk = None` and `instance.s

![](https://user-images.githubusercontent.com/17484350/221387085-e0ca31ee-8c4c-40d9-9ce6-44ff5e6814ff.png)


> **NOTE:** :warning:
>
> * Ensure that `model_clone` is placed before `django.contrib.admin`
Expand All @@ -150,16 +149,14 @@ INSTALLED_APPS = [
]
```


## Advanced Usage
## Advanced Usage

### Signals

#### pre\_clone\_save, post\_clone\_save

![](https://user-images.githubusercontent.com/17484350/221387120-b5219cdb-9f74-4751-b593-2c68db9fd0e0.png)


### Clone Many to Many fields

#### Using the `CloneModel`
Expand All @@ -171,7 +168,6 @@ INSTALLED_APPS = [

![](https://user-images.githubusercontent.com/17484350/221387265-ccf05239-ec0c-47ec-b0ed-6c2e01428aee.png)


### Multi database support

![](https://user-images.githubusercontent.com/17484350/221385217-3a123080-b247-4ef0-b876-e75db1518c92.png)
Expand Down

0 comments on commit e9bbf02

Please sign in to comment.