{ "info": { "author": "attevaltonen", "author_email": "atte.hj.valtonen@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: Finnish", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "DRF CRUD Proxy\n==============\n\nThis package provides extended Django REST Framework generic views and viewsets that provide the possibility to specify\ndifferent serializers for reading the incoming request and presenting the response.\n\nThis is super handy in situations where you want to, for example, let the user send a ForeignKey attribute,\nbut present the related object alongside the response instead of only the database ID.\n\nRequirements\n------------\n\n- Python 3.6 or 3.7 (probably older versions as well)\n- Django 2.0 or 2.1\n- Django REST Framework 3.x\n\nInstallation\n------------\n\n.. code::\n\n pip install drf-crud-proxy\n\nUsage\n-----\n\nImport the generic views and subclass your own views from them. Specify ``request_serializer_class`` and/or\n``response_serializer_class`` to the view (both default to DRF's own ``serializer_class`` attribute).\n\n.. code:: python\n\n # api/views.py\n\n from drf_crud_proxy import generics\n from app.models import MyModel\n from api.serializers import MyModelCreateSerializer, MyModelSerializer\n\n\n class MyModelListCreateView(generics.ProxiedListCreateAPIView):\n queryset = MyModel.objects.all()\n request_serializer_class = MyModelCreateSerializer\n response_serializer_class = MyModelSerializer\n\nThe incoming request is handled with ``MyModelCreateSerializer`` and the response with ``MyModelSerializer``.\n\nIf you want to customize the data on either situation, override ``get_request_data`` and/or ``get_response_data``\nmethods in the view.\n\nThe package also supports the so-called ``PUT-as-create`` behavior that was removed from DRF in its 3.0 release. Note that\nthe user has to have model permissions for the corresponding create behavior (``POST`` request).\n\n**NOTE**: The ``PUT-as-create`` functionality doesn't have tests (yet).\n\n## License\n\nMIT\n\nThis functionality in DRF is something I've needed in numerous Django projects, so hopefully this will help someone else\ntoo :)\n\nThis package has been built on top of the ideas presented by the great vintasoftware's ``drf-rw-serializers`` (https://github.com/vintasoftware/drf-rw-serializers) package. Thanks!", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/attevaltonen/drf-crud-proxy", "keywords": "Django REST Framework,Serializers,REST,API,Django", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "drf-crud-proxy", "package_url": "https://pypi.org/project/drf-crud-proxy/", "platform": "", "project_url": "https://pypi.org/project/drf-crud-proxy/", "project_urls": { "Homepage": "https://github.com/attevaltonen/drf-crud-proxy" }, "release_url": "https://pypi.org/project/drf-crud-proxy/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Separate serializers for parsing requests and returning responses in DRF", "version": "0.1.2" }, "last_serial": 4546246, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "fcd8fb5fc27900366a4d66c11c49040b", "sha256": "0756944c0f922b0c675f3668a78f058fdf6e13040a583682db6088977ee7b568" }, "downloads": -1, "filename": "drf-crud-proxy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "fcd8fb5fc27900366a4d66c11c49040b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8109, "upload_time": "2018-08-20T13:36:36", "url": "https://files.pythonhosted.org/packages/f2/f7/ffe364271ff5708d31eb38ed963b3a3b84424511c5e747c74ffa334186a0/drf-crud-proxy-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1828f440d1f0bd8c74217961fd3e5f3f", "sha256": "97abbfb518f65206de386d9b682ec7e22f07b9ed1bffa2e0f556f761c806b5e4" }, "downloads": -1, "filename": "drf-crud-proxy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1828f440d1f0bd8c74217961fd3e5f3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3807, "upload_time": "2018-08-20T14:09:55", "url": "https://files.pythonhosted.org/packages/b8/c9/a81ec8b4710727a56c6b0bc1645c827d880963f43d7ffb7d42e393721658/drf-crud-proxy-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4bfe4d3c109a92b36678477ee31c4daa", "sha256": "4ebdc3679235260dd1df3e064f50d4016239a80a30bd638157a71a51d4c6b127" }, "downloads": -1, "filename": "drf-crud-proxy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4bfe4d3c109a92b36678477ee31c4daa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4978, "upload_time": "2018-11-30T08:35:00", "url": "https://files.pythonhosted.org/packages/1f/c6/bc84ec40bc511274ff1773c86d959ce68ec7ddcc8cbebe7ea878dd0617b3/drf-crud-proxy-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4bfe4d3c109a92b36678477ee31c4daa", "sha256": "4ebdc3679235260dd1df3e064f50d4016239a80a30bd638157a71a51d4c6b127" }, "downloads": -1, "filename": "drf-crud-proxy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4bfe4d3c109a92b36678477ee31c4daa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4978, "upload_time": "2018-11-30T08:35:00", "url": "https://files.pythonhosted.org/packages/1f/c6/bc84ec40bc511274ff1773c86d959ce68ec7ddcc8cbebe7ea878dd0617b3/drf-crud-proxy-0.1.2.tar.gz" } ] }