Metadata-Version: 2.1
Name: django-rest-inherits-error-messages
Version: 1.0.0
Summary: ModelSerializer inherits the error_messages of the model
Home-page: https://github.com/gongul/django-rest-inherits-error-messages
Author: gongul
Author-email: projectgongul@gmail.com
License: MIT
Description: # Django Rest Error Inherits Error Messages
        ModelSerializer inherits the error_messages of the model
        
        
        ## Example 
        ```
        pip install django-rest-inherits-error-messages
        ```
        
        Set error_messages in your model field.
        models.py
        ```
        class TestModel(django.db.models.Model):
            id = models.BigAutoField(primary_key=True)
            name = models.CharField(max_length=10, error_messages={'required':'[test] This field is required.'})
        ```
        
        Go to your ModelSerializer and inherit the InheritsModelSerializer (InheritsHyperlinkedModelSerializer also exists)
        ```
        class TestSerializer(InheritsModelSerializer):
            class Meta:
                model = TestModel
                fields = '__all__'
        ```
        
        If set as above, error_messages will be inherited.
        
        ## Contributions
        Issues and PR are welcome.
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
