Skip to main content

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:

  1. Add library in INSTALLED_APPS.
INSTALLED_APPS = [
    ...
    "django_form_copy",
]
  1. 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 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

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

django-form-copy-0.1.4.tar.gz (6.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page