{ "info": { "author": "Praekelt Consulting", "author_email": "dev@praekelt.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django Rest Framework Extras\n############################\n.. image:: https://travis-ci.org/praekelt/djangorestframework-extras.svg?branch=develop\n :target: https://travis-ci.org/praekelt/djangorestframework-extras?branch=develop\n.. image:: https://coveralls.io/repos/github/praekelt/djangorestframework-extras/badge.svg\n :target: https://coveralls.io/github/praekelt/djangorestframework-extras\n\n**DRFE generates RESTful API's for any Django models. It builds on Django Rest Framework.**\n\n.. contents:: Table of Contents\n :depth: 1\n\nPrerequisite\n============\n#. pip install ``djangorestframework``\n\n#. Add ``rest_framework`` to your ``INSTALLED_APPS`` setting in ``settings.py``.\n\n\nInstallation\n============\n\n#. Install or add ``djangorestframework-extras`` to your Python path.\n\n#. Add ``rest_framework_extras`` to your ``INSTALLED_APPS`` setting in ``settings.py``.\n\n\nFeature List\n============\n\n- Generating default serializers and viewsets for all known applications to create RESTful API's.\n- Registering all viewsets known to the application with the Django Rest Framework router.\n- Custom serializers and permissions for the default user, the staff users and superusers.\n- Custom FormMixin that Delegates validation to a normal Django form.\n- Custom Hyperlink fields and serializer, ``HyperlinkedRelatedField`` and ``HyperlinkedModelSerializer``\n\n\nUsage\n=====\n\nUser permissions and the custom UsersViewSet\n--------------------------------------------\n\n``djangorestframework-extras`` provides a custom ViewSet ``UsersViewSet`` with serializers and permissions for the default user, the staff user and the superuser.\n\nRegister UsersViewSet through the DefaultRouter::\n\n from rest_framework_extras.users.viewsets import UsersViewSet\n\n router = routers.DefaultRouter()\n\n router.register(r'users', UsersViewSet, 'user')\n\nDiscovery and registration of ViewSets\n--------------------------------------\n\nEnable discovery and registration of default serializers and viewsets by adding the following to ``urls.py``::\n\n from rest_framework import routers\n import rest_framework_extras\n router = routers.DefaultRouter()\n\n rest_framework_extras.discover(router)\n rest_framework_extras.register(router)\n\n urlpatterns = [\n url(r\"^api/(?P(v1))/\", include(router.urls))\n ]\n\n**Going through the code line by line:**\n\n#. Line 1 & 3: The router and DefaultRouter classes connects the views and urls automatically and also creates the API root.\n#. Line 5: The new discover function generates default serializers and viewsets. This function should be run before normal registration.\n#. Line 6: The new register function registers all viewsets (including the UsersViewSet), overriding any items already registered with the same name.\n#. Line 9: Define the urls by including router.urls.\n\nAvailable Settings\n------------------\n\n``REST_FRAMEWORK_EXTRAS``\n\n**blacklist**: A dictionary of the models to blacklist. By default the following models are blacklisted::\n\n \"REST_FRAMEWORK_EXTRAS\": {\n \"blacklist\": {\n \"sessions-session\": {},\n \"admin-logentry\": {}\n },\n \"authentication-classes\": (SessionAuthentication, BasicAuthentication),\n \"permission-classes\": (DjangoModelPermissions,)\n }\n\nTips\n====\n\nChange the name of the registered user model by changing the ``mapping`` parameter, such as::\n\n rest_framework_extras.register(router, mapping=((\"user\", UsersViewSet),))\n\nRestrict models that will be displayed through the Django Rest Framework by using the ``only`` and ``override`` parameters. Define a comma separated list, such as::\n\n rest_framework_extras.discover(router, only=[\"auth-user\", \"auth-permission\"])\n\ntodo: document override\n\nUnit Testing\n============\n\nRun tests by using the following command::\n\n python manage.py test rest_framework_extras.tests --settings=rest_framework_extras.tests.settings.111\n\nLicense\n=======\n\nPlease see the License requirements in the LICENSE file of this repository.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/praekelt/djangorestframework-extras", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "djangorestframework-extras", "package_url": "https://pypi.org/project/djangorestframework-extras/", "platform": "", "project_url": "https://pypi.org/project/djangorestframework-extras/", "project_urls": { "Homepage": "http://github.com/praekelt/djangorestframework-extras" }, "release_url": "https://pypi.org/project/djangorestframework-extras/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Autogenerate API's for models. Expose core Django functionality. Validate against existing forms.", "version": "0.3.0" }, "last_serial": 3810008, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d29eb6f75110c3af3f8aa751791600c4", "sha256": "72e2ac78d211b2e21c9238bfca36881d181e4d7d9b6d5616d601bde86daa71c6" }, "downloads": -1, "filename": "djangorestframework_extras-0.1-py2.7.egg", "has_sig": false, "md5_digest": "d29eb6f75110c3af3f8aa751791600c4", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 33883, "upload_time": "2016-10-26T09:14:32", "url": "https://files.pythonhosted.org/packages/e9/48/25ff68e602d7f7b3d45bd61270b375f32dfb56ab7904f41b877f9b9c4a72/djangorestframework_extras-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "038a5343a6926efc9ae72dc5514ad925", "sha256": "e5aaeb7e65e6016897042d8ee7f07a1d39886c58d9e7f0bfeafedcac8496d97a" }, "downloads": -1, "filename": "djangorestframework-extras-0.1.tar.gz", "has_sig": false, "md5_digest": "038a5343a6926efc9ae72dc5514ad925", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11128, "upload_time": "2016-10-26T09:14:28", "url": "https://files.pythonhosted.org/packages/7f/ff/d9e2b6326fbe2a5e7ef5eddec1b42737a7dc0c0240ad18fc75c1187d6dc4/djangorestframework-extras-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4db8f960647bc9e1672422633d9e6e1b", "sha256": "802d925a1a18b1742763491dd2701f0f759350d2cf2ca804b7a6527851024e73" }, "downloads": -1, "filename": "djangorestframework_extras-0.2-py2.7.egg", "has_sig": false, "md5_digest": "4db8f960647bc9e1672422633d9e6e1b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 34172, "upload_time": "2017-05-03T07:55:55", "url": "https://files.pythonhosted.org/packages/b5/7f/2e2c07690fb7dc5392667fa4eb42a77b03f6689e22d0d7e910b4154ac48e/djangorestframework_extras-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "82a1d15500dda1175d08e3b9f297aaae", "sha256": "ebbb214831dda453dd341075f6a3e30bc36cd70c9d27a6130d4563855d8cd288" }, "downloads": -1, "filename": "djangorestframework-extras-0.2.tar.gz", "has_sig": false, "md5_digest": "82a1d15500dda1175d08e3b9f297aaae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11858, "upload_time": "2017-05-03T07:55:52", "url": "https://files.pythonhosted.org/packages/f8/1e/fdb8c51d4cfc351ef4d4a8285bafc03bbd47eae61e02e4c4a9a3af0d7dfd/djangorestframework-extras-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7df43b5f682b76708b62e24c7fe4d763", "sha256": "b215bb1e3164087c8b48c8d7ccdeb12a9f8b8a7c1539e60e097d96f1a82a9abd" }, "downloads": -1, "filename": "djangorestframework_extras-0.2.1-py2.7.egg", "has_sig": false, "md5_digest": "7df43b5f682b76708b62e24c7fe4d763", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 37644, "upload_time": "2017-05-03T13:02:29", "url": "https://files.pythonhosted.org/packages/2a/d6/ec1b98bcd3b0334297b1c08d6b4a230f0d34b6070cc6994f68a9e5d70fe2/djangorestframework_extras-0.2.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4a8652942b68e2251429aaa8500335eb", "sha256": "0cc1ae8883934db64bf82fb5b68b7f10741c0846d657b9ca3c67502a6c496257" }, "downloads": -1, "filename": "djangorestframework-extras-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4a8652942b68e2251429aaa8500335eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11923, "upload_time": "2017-05-03T13:02:26", "url": "https://files.pythonhosted.org/packages/8c/78/33909bb117f22cd68090b5b24f21830c1322c9ad9fe9c5fe7a2d5188f856/djangorestframework-extras-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2deae238348f1ec198664a053c0edec2", "sha256": "9264d3370ae400d2436a8383bbc20011c4b86466bc165772ffce09d93f8349cf" }, "downloads": -1, "filename": "djangorestframework_extras-0.3.0-py2.7.egg", "has_sig": false, "md5_digest": "2deae238348f1ec198664a053c0edec2", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 39599, "upload_time": "2018-04-26T12:15:50", "url": "https://files.pythonhosted.org/packages/e2/df/0fc825c617ee1337b1f8cc92b8d28bc3dc06b634baafec7744044438a03f/djangorestframework_extras-0.3.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d3213a2311a6b8058f0360043f4f46e3", "sha256": "35f9a712707908d339a5e0b7ad1d77332a3d3de194f25faf7e473b99ea92ad71" }, "downloads": -1, "filename": "djangorestframework-extras-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d3213a2311a6b8058f0360043f4f46e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11968, "upload_time": "2018-04-26T12:15:47", "url": "https://files.pythonhosted.org/packages/3b/2d/682d0243538511d2a5bcb78df4a062d03ba36463fd5c44dd4b5d4757a842/djangorestframework-extras-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2deae238348f1ec198664a053c0edec2", "sha256": "9264d3370ae400d2436a8383bbc20011c4b86466bc165772ffce09d93f8349cf" }, "downloads": -1, "filename": "djangorestframework_extras-0.3.0-py2.7.egg", "has_sig": false, "md5_digest": "2deae238348f1ec198664a053c0edec2", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 39599, "upload_time": "2018-04-26T12:15:50", "url": "https://files.pythonhosted.org/packages/e2/df/0fc825c617ee1337b1f8cc92b8d28bc3dc06b634baafec7744044438a03f/djangorestframework_extras-0.3.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d3213a2311a6b8058f0360043f4f46e3", "sha256": "35f9a712707908d339a5e0b7ad1d77332a3d3de194f25faf7e473b99ea92ad71" }, "downloads": -1, "filename": "djangorestframework-extras-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d3213a2311a6b8058f0360043f4f46e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11968, "upload_time": "2018-04-26T12:15:47", "url": "https://files.pythonhosted.org/packages/3b/2d/682d0243538511d2a5bcb78df4a062d03ba36463fd5c44dd4b5d4757a842/djangorestframework-extras-0.3.0.tar.gz" } ] }