Metadata-Version: 1.1
Name: django-modelduplication
Version: 0.1.2
Summary: A simple Django app to duplicate model instance in admin.
Home-page: https://github.com/squallcs12/django-modelduplication
Author: Bang Dao
Author-email: daotranbang@gmail.com
License: MIT License
Description-Content-Type: UNKNOWN
Description: =====
        Model Duplication
        =====
        
        Django admin have `save_as` feature, but that feature have bug with images field, and sometime you want 100% duplication of a model instance with all other related objects and customization, then `save_as` doesn't fit for that purpose.
        
        Quick start
        -----------
        
        1. Add "modelduplication" to your INSTALLED_APPS setting like this:
        .. code-block:: python
        
            INSTALLED_APPS = [
                # ...  
                'modelduplication',
            ]
        
        
        2. Define `pre_duplicate` and `post_duplicate` to your models to customize duplication process:
        .. code-block:: python
        
            class Book(models.Model):
                def pre_duplicate(self, origin):
                    """This method use to modify object before `save` on duplication.
                    :type origin models.Model
                    :param origin the origin instance
                    """ 
                    pass
        
                def post_duplicate(self, origin):
                    """This method is called after finishing the duplication.
                    :type origin models.Model
                    :param origin the origin instance
                    """ 
                    pass
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
