Metadata-Version: 2.1
Name: django-form-copy
Version: 0.1.4
Summary: Library for quickly copying django objects from one to another project.
Home-page: https://github.com/DeNRuDi/django-form-copy
Author: DeNRuDi
Author-email: denisrudnitskiy0@gmail.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django
Requires-Dist: clipboard==0.0.4
Requires-Dist: python-dateutil==2.8.2

# django-form-copy


Library for quickly copying django objects from one to another project.


How to use:

1. Add library in `INSTALLED_APPS`.

```
INSTALLED_APPS = [
    ...
    "django_form_copy",
]
```
2. After added the application - just add a mixin `CopyPasteMixin` where you register your application 
for the admin panel.

```
# admin.py
from django_form_copy import CopyPasteMixin

@admin.register(YourModel)
class YourModelAdmin(CopyPasteMixin, admin.ModelAdmin):
    ...
    # your other attributes
```

After you want to copy an object, go to edit the model object and click the `Copy` button. 
![copy.png](copy.png)
Once the data is saved to the clipboard, you can go to any similar project and recreate this object.
For example, you use "stage" on another server or "localhost" on your personal computer.
Click on the "+" to add object in admin panel, click on the `Paste` button to recreate this object with 
all relations (including ForeignKey and ManyToMany - these will be created if not found on your other server).
![paste.png](paste.png)
