Library for quickly copying django objects from one to another project.
Project description
django-form-copy
Library for quickly copying django objects from one to another project.
How to use:
- Add library in
INSTALLED_APPS.
INSTALLED_APPS = [
...
"django_form_copy",
]
- After added the application - just add a mixin
CopyPasteMixinwhere 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.
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).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-form-copy-0.1.7.tar.gz.
File metadata
- Download URL: django-form-copy-0.1.7.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e924d943748ba17ca984fb151de668b554ab3a7aa2760057401995ee601af11
|
|
| MD5 |
69a4a0445ec77d7f71dc3728009b878a
|
|
| BLAKE2b-256 |
7c9fd161b50a44fdf5742c826da7eddb9942d8aaf83440b213b02d1d572d9a42
|