[Python-modules-commits] [drf-generators] 01/03: Import drf-generators_0.2.7.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Fri Nov 20 10:40:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch master
in repository drf-generators.

commit 63889379e11b716d916fa9705e855518c77c23bf
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Nov 20 10:45:37 2015 +0100

    Import drf-generators_0.2.7.orig.tar.gz
---
 PKG-INFO                                       | 304 +++++++++++++++++++++++++
 README.rst                                     | 279 +++++++++++++++++++++++
 drf_generators.egg-info/PKG-INFO               | 304 +++++++++++++++++++++++++
 drf_generators.egg-info/SOURCES.txt            |  19 ++
 drf_generators.egg-info/dependency_links.txt   |   1 +
 drf_generators.egg-info/requires.txt           |   1 +
 drf_generators.egg-info/top_level.txt          |   1 +
 drf_generators/__init__.py                     |   0
 drf_generators/generators.py                   | 116 ++++++++++
 drf_generators/management/__init__.py          |   0
 drf_generators/management/commands/__init__.py |   0
 drf_generators/management/commands/generate.py |  84 +++++++
 drf_generators/templates/__init__.py           |   0
 drf_generators/templates/apiview.py            |  71 ++++++
 drf_generators/templates/function.py           |  63 +++++
 drf_generators/templates/modelviewset.py       |  25 ++
 drf_generators/templates/serializer.py         |  14 ++
 drf_generators/templates/viewset.py            |  62 +++++
 setup.cfg                                      |   8 +
 setup.py                                       |  44 ++++
 20 files changed, 1396 insertions(+)

diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..02cf4db
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,304 @@
+Metadata-Version: 1.1
+Name: drf-generators
+Version: 0.2.7
+Summary: Generate DRF Serializers, Views, and urls for your API aplication.
+Home-page: https://github.com/brobin/drf-generators
+Author: Tobin Brown
+Author-email: tobin at brobin.me
+License: MIT
+Download-URL: https://github.com/brobin/drf-generators/archive/0.2.7.zip
+Description: ==============
+        DRF Generators
+        ==============
+        
+        Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in `Django Rest Framework <http://github.com/tomchristie/django-rest-framework>`_. With DRF Generators, one simple command will generate all of your Views, Serializers, and even Urls for your Django Rest Framework application!
+        
+        For a full step-by-step tutorial, check out my `blog post <http://brobin.me/blog/2015/4/13/how-to-quickly-write-an-api-in-django>`_!
+        
+        This is **not** intended to give you a production quality API. It was intended to jumpstart your development and save you from writing the same code over and over for each model.
+        
+        ---------------
+        
+        |python| |pypi| |license| |travis| |django| |drf|
+        
+        ---------------
+        
+        * `Installation`_
+        * `Usage`_
+        * `Serializers`_
+        * `Views`_
+        * `Urls`_
+        * `Tests`_
+        * `License`_
+        
+        ---------------
+        
+        ============
+        Installation
+        ============
+        
+        Install with pip:
+        
+        .. code-block:: bash
+        
+            $ pip install drf-generators
+        
+        or Clone the repo and install manually:
+        
+        .. code-block:: bash
+        
+            $ git clone https://github.com/brobin/drf-generators.git
+            $ cd drf-generators
+            $ python setup.py install
+        
+        To use DRF Generators, add it your INSTALLED_APPS.
+        
+        .. code-block:: python
+        
+            INSTALLED_APPS = (
+                ...
+                'rest_framework',
+                'drf_generators',
+                ...
+            )
+        
+        *Note*: In order to use the APIView classes, you must have the rest framework DEFAULT_PAGINATION_CLASS and PAGE_SIZE set.
+        
+        .. code-block:: python
+        
+            REST_FRAMEWORK = {
+                'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
+                'PAGE_SIZE': 15
+            }
+        
+        -----------------
+        
+        =====
+        Usage
+        =====
+        
+        To use the generators, run the following command, where ``app`` is the application to generate an API for.
+        
+        .. code-block:: bash
+        
+           $ python manage.py generate {app} {options}
+        
+        ========================== ===================================================
+        Option                     Action
+        ========================== ===================================================
+        ``--serializers``          Generate only Serializers for your app.
+        ``--views``                Generate only Views for your app.
+        ``--urls``                 Generate only urls for your app.
+        ``--force``                Overwrite existing files without the warning prompt.
+        ``-f``, ``--format``       Format to use when generating views and urls. Valid options: ``viewset``, ``apiview``, ``function``, ``modelviewset``. Default: ``viewset``.
+        ``-d``, ``--depth``        Serialization depth for related models. Default: 0
+        ========================== ===================================================
+        
+        **Example:** Generate everything for the app ``api`` with function style views, overwriting existing files, with a serialization depth of 2.
+        
+        .. code-block:: bash
+        
+            $ python manage.py generate api --format function --force -- depth=2
+        
+        -------------------
+        
+        ===========
+        Serializers
+        ===========
+        
+        Drf Generators will create ``serializers.py`` for your application. It currently uses rest framework's ``ModelSerializer`` for serialization of the models defined in ``models.py``.
+        
+        .. code-block:: python
+        
+            class ModelSerializer(serializers.ModelSerializer):
+        
+                class Meta:
+                    model = User
+        
+        ------------------
+        
+        =====
+        Views
+        =====
+        
+        DRF Generators will create ``views.py`` for your application. It can generate ``ViewSet``, ``APIView`` and function based views. Set the ``--format`` option when running the generator to pick the preferred style
+        
+        -------
+        ViewSet
+        -------
+        
+        ``python manage.py generate api  --format viewset``
+        
+        .. code-block:: python
+        
+            class ModelViewSet(ViewSet):
+        
+                def list(self, request):
+                    ...
+                def create(self, request):
+                    ...
+                def retrieve(self, request, pk=None):
+                    ...
+                def update(self, request, pk=None):
+                    ...
+                def destroy(self, request, pk=None):
+                    ...
+        
+        -------
+        APIView
+        -------
+        
+        ``python manage.py generate api --format apiview``
+        
+        .. code-block:: python
+        
+            class ModelAPIView(APIView):
+        
+                def get(self, request, id, format=None):
+                    ...
+                def put(self, request, id, format=None):
+                    ...
+                def delete(self, request, id, format=None):
+                    ...
+        
+            class ModelAPIListView(APIView):
+        
+                def get(self, request, format=None):
+                    ...
+                def post(self, request, format=None):
+                    ...
+        
+        --------
+        Function
+        --------
+        
+        ``python manage.py generate api --format function``
+        
+        .. code-block:: python
+        
+            @api_view(['GET', 'POST'])
+            def model_list(request):
+                if request.method == 'GET':
+                    ...
+                elif request.method == 'POST':
+                    ...
+        
+            @api_view(['GET', 'PUT', 'DELETE'])
+            def model_detail(request, pk):
+                if request.method == 'GET':
+                    ...
+                elif request.method == 'PUT':
+                    ...
+                elif request.method == 'DELETE':
+                    ...
+        
+        -------------
+        ModelViewSet
+        -------------
+        
+        ``python manage.py generate api --format modelviewset``
+        
+        .. code-block:: python
+        
+            class MyModelViewSet(ModelViewSet):
+                queryset = MyModel.objects.all()
+                serializer_class = MyModelSerializer
+        
+        -----------------
+        
+        ====
+        Urls
+        ====
+        
+        Finally, DRF Generator will create you a default ``urls.py`` to match the View format you are using.
+        
+        ----------------------------
+        ViewSet & ModeViewSet Routes
+        ----------------------------
+        
+        .. code-block:: python
+        
+            router = SimpleRouter()
+        
+            router.register(r'model', views.ModelViewSet, 'Model')
+        
+            urlpatterns = router.urls
+        
+        ------------
+        APIView urls
+        ------------
+        
+        .. code-block:: python
+        
+            url(r'^model/([0-9]+)$', views.ModelAPIView.as_view()),
+            url(r'^model', views.ModelAPIListView.as_view()),
+        
+        -------------
+        Function urls
+        -------------
+        
+        .. code-block:: python
+        
+            urlpatterns = [
+        
+                url(r'^model/(?P<pk>[0-9]+)$', views.model_detail),
+                url(r'^model/$', views.model_list),
+        
+            ]
+        
+            urlpatterns = format_suffix_patterns(urlpatterns)
+        
+        
+        =====
+        Tests
+        =====
+        
+        A full application built with drf-generators can be found in the `tests directory <http://github.com/brobin/drf-generators/tree/master/tests>`_. Instructions on running the tests can be found in the test project's README.
+        
+        
+        =======
+        License
+        =======
+        
+        MIT License. See `LICENSE <https://github.com/brobin/drf-generators/blob/master/LICENSE>`_.
+        
+        
+        .. |python| image:: https://img.shields.io/pypi/v/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: Supported Python versions
+        
+        .. |pypi| image:: https://img.shields.io/pypi/pyversions/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: Latest Version
+        
+        .. |license| image:: https://img.shields.io/pypi/l/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: License
+        
+        .. |travis| image:: https://img.shields.io/travis/Brobin/drf-generators.svg?style=flat-square
+            :target: https://travis-ci.org/Brobin/drf-generators/
+            :alt: Travis CI
+        
+        .. |django| image:: https://img.shields.io/badge/Django-1.7, 1.8-orange.svg?style=flat-square
+            :target: http://djangoproject.com/
+            :alt: Django 1.7, 1.8
+        
+        .. |drf| image:: https://img.shields.io/badge/DRF-3.2, 3.2-orange.svg?style=flat-square
+            :target: http://www.django-rest-framework.org/
+            :alt: DRF 3.0, 3.1
+        
+Keywords: API REST framework generate scaffold
+Platform: UNKNOWN
+Classifier: Environment :: Web Environment
+Classifier: Framework :: Django :: 1.7
+Classifier: Framework :: Django :: 1.8
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Natural Language :: English
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Internet :: WWW/HTTP
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..ec18799
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,279 @@
+==============
+DRF Generators
+==============
+
+Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in `Django Rest Framework <http://github.com/tomchristie/django-rest-framework>`_. With DRF Generators, one simple command will generate all of your Views, Serializers, and even Urls for your Django Rest Framework application!
+
+For a full step-by-step tutorial, check out my `blog post <http://brobin.me/blog/2015/4/13/how-to-quickly-write-an-api-in-django>`_!
+
+This is **not** intended to give you a production quality API. It was intended to jumpstart your development and save you from writing the same code over and over for each model.
+
+---------------
+
+|python| |pypi| |license| |travis| |django| |drf|
+
+---------------
+
+* `Installation`_
+* `Usage`_
+* `Serializers`_
+* `Views`_
+* `Urls`_
+* `Tests`_
+* `License`_
+
+---------------
+
+============
+Installation
+============
+
+Install with pip:
+
+.. code-block:: bash
+
+    $ pip install drf-generators
+
+or Clone the repo and install manually:
+
+.. code-block:: bash
+
+    $ git clone https://github.com/brobin/drf-generators.git
+    $ cd drf-generators
+    $ python setup.py install
+
+To use DRF Generators, add it your INSTALLED_APPS.
+
+.. code-block:: python
+
+    INSTALLED_APPS = (
+        ...
+        'rest_framework',
+        'drf_generators',
+        ...
+    )
+
+*Note*: In order to use the APIView classes, you must have the rest framework DEFAULT_PAGINATION_CLASS and PAGE_SIZE set.
+
+.. code-block:: python
+
+    REST_FRAMEWORK = {
+        'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
+        'PAGE_SIZE': 15
+    }
+
+-----------------
+
+=====
+Usage
+=====
+
+To use the generators, run the following command, where ``app`` is the application to generate an API for.
+
+.. code-block:: bash
+
+   $ python manage.py generate {app} {options}
+
+========================== ===================================================
+Option                     Action
+========================== ===================================================
+``--serializers``          Generate only Serializers for your app.
+``--views``                Generate only Views for your app.
+``--urls``                 Generate only urls for your app.
+``--force``                Overwrite existing files without the warning prompt.
+``-f``, ``--format``       Format to use when generating views and urls. Valid options: ``viewset``, ``apiview``, ``function``, ``modelviewset``. Default: ``viewset``.
+``-d``, ``--depth``        Serialization depth for related models. Default: 0
+========================== ===================================================
+
+**Example:** Generate everything for the app ``api`` with function style views, overwriting existing files, with a serialization depth of 2.
+
+.. code-block:: bash
+
+    $ python manage.py generate api --format function --force -- depth=2
+
+-------------------
+
+===========
+Serializers
+===========
+
+Drf Generators will create ``serializers.py`` for your application. It currently uses rest framework's ``ModelSerializer`` for serialization of the models defined in ``models.py``.
+
+.. code-block:: python
+
+    class ModelSerializer(serializers.ModelSerializer):
+
+        class Meta:
+            model = User
+
+------------------
+
+=====
+Views
+=====
+
+DRF Generators will create ``views.py`` for your application. It can generate ``ViewSet``, ``APIView`` and function based views. Set the ``--format`` option when running the generator to pick the preferred style
+
+-------
+ViewSet
+-------
+
+``python manage.py generate api  --format viewset``
+
+.. code-block:: python
+
+    class ModelViewSet(ViewSet):
+
+        def list(self, request):
+            ...
+        def create(self, request):
+            ...
+        def retrieve(self, request, pk=None):
+            ...
+        def update(self, request, pk=None):
+            ...
+        def destroy(self, request, pk=None):
+            ...
+
+-------
+APIView
+-------
+
+``python manage.py generate api --format apiview``
+
+.. code-block:: python
+
+    class ModelAPIView(APIView):
+
+        def get(self, request, id, format=None):
+            ...
+        def put(self, request, id, format=None):
+            ...
+        def delete(self, request, id, format=None):
+            ...
+
+    class ModelAPIListView(APIView):
+
+        def get(self, request, format=None):
+            ...
+        def post(self, request, format=None):
+            ...
+
+--------
+Function
+--------
+
+``python manage.py generate api --format function``
+
+.. code-block:: python
+
+    @api_view(['GET', 'POST'])
+    def model_list(request):
+        if request.method == 'GET':
+            ...
+        elif request.method == 'POST':
+            ...
+
+    @api_view(['GET', 'PUT', 'DELETE'])
+    def model_detail(request, pk):
+        if request.method == 'GET':
+            ...
+        elif request.method == 'PUT':
+            ...
+        elif request.method == 'DELETE':
+            ...
+
+-------------
+ModelViewSet
+-------------
+
+``python manage.py generate api --format modelviewset``
+
+.. code-block:: python
+
+    class MyModelViewSet(ModelViewSet):
+        queryset = MyModel.objects.all()
+        serializer_class = MyModelSerializer
+
+-----------------
+
+====
+Urls
+====
+
+Finally, DRF Generator will create you a default ``urls.py`` to match the View format you are using.
+
+----------------------------
+ViewSet & ModeViewSet Routes
+----------------------------
+
+.. code-block:: python
+
+    router = SimpleRouter()
+
+    router.register(r'model', views.ModelViewSet, 'Model')
+
+    urlpatterns = router.urls
+
+------------
+APIView urls
+------------
+
+.. code-block:: python
+
+    url(r'^model/([0-9]+)$', views.ModelAPIView.as_view()),
+    url(r'^model', views.ModelAPIListView.as_view()),
+
+-------------
+Function urls
+-------------
+
+.. code-block:: python
+
+    urlpatterns = [
+
+        url(r'^model/(?P<pk>[0-9]+)$', views.model_detail),
+        url(r'^model/$', views.model_list),
+
+    ]
+
+    urlpatterns = format_suffix_patterns(urlpatterns)
+
+
+=====
+Tests
+=====
+
+A full application built with drf-generators can be found in the `tests directory <http://github.com/brobin/drf-generators/tree/master/tests>`_. Instructions on running the tests can be found in the test project's README.
+
+
+=======
+License
+=======
+
+MIT License. See `LICENSE <https://github.com/brobin/drf-generators/blob/master/LICENSE>`_.
+
+
+.. |python| image:: https://img.shields.io/pypi/v/drf-generators.svg?style=flat-square
+    :target: https://pypi.python.org/pypi/drf-generators/
+    :alt: Supported Python versions
+
+.. |pypi| image:: https://img.shields.io/pypi/pyversions/drf-generators.svg?style=flat-square
+    :target: https://pypi.python.org/pypi/drf-generators/
+    :alt: Latest Version
+
+.. |license| image:: https://img.shields.io/pypi/l/drf-generators.svg?style=flat-square
+    :target: https://pypi.python.org/pypi/drf-generators/
+    :alt: License
+
+.. |travis| image:: https://img.shields.io/travis/Brobin/drf-generators.svg?style=flat-square
+    :target: https://travis-ci.org/Brobin/drf-generators/
+    :alt: Travis CI
+
+.. |django| image:: https://img.shields.io/badge/Django-1.7, 1.8-orange.svg?style=flat-square
+    :target: http://djangoproject.com/
+    :alt: Django 1.7, 1.8
+
+.. |drf| image:: https://img.shields.io/badge/DRF-3.2, 3.2-orange.svg?style=flat-square
+    :target: http://www.django-rest-framework.org/
+    :alt: DRF 3.0, 3.1
diff --git a/drf_generators.egg-info/PKG-INFO b/drf_generators.egg-info/PKG-INFO
new file mode 100644
index 0000000..02cf4db
--- /dev/null
+++ b/drf_generators.egg-info/PKG-INFO
@@ -0,0 +1,304 @@
+Metadata-Version: 1.1
+Name: drf-generators
+Version: 0.2.7
+Summary: Generate DRF Serializers, Views, and urls for your API aplication.
+Home-page: https://github.com/brobin/drf-generators
+Author: Tobin Brown
+Author-email: tobin at brobin.me
+License: MIT
+Download-URL: https://github.com/brobin/drf-generators/archive/0.2.7.zip
+Description: ==============
+        DRF Generators
+        ==============
+        
+        Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in `Django Rest Framework <http://github.com/tomchristie/django-rest-framework>`_. With DRF Generators, one simple command will generate all of your Views, Serializers, and even Urls for your Django Rest Framework application!
+        
+        For a full step-by-step tutorial, check out my `blog post <http://brobin.me/blog/2015/4/13/how-to-quickly-write-an-api-in-django>`_!
+        
+        This is **not** intended to give you a production quality API. It was intended to jumpstart your development and save you from writing the same code over and over for each model.
+        
+        ---------------
+        
+        |python| |pypi| |license| |travis| |django| |drf|
+        
+        ---------------
+        
+        * `Installation`_
+        * `Usage`_
+        * `Serializers`_
+        * `Views`_
+        * `Urls`_
+        * `Tests`_
+        * `License`_
+        
+        ---------------
+        
+        ============
+        Installation
+        ============
+        
+        Install with pip:
+        
+        .. code-block:: bash
+        
+            $ pip install drf-generators
+        
+        or Clone the repo and install manually:
+        
+        .. code-block:: bash
+        
+            $ git clone https://github.com/brobin/drf-generators.git
+            $ cd drf-generators
+            $ python setup.py install
+        
+        To use DRF Generators, add it your INSTALLED_APPS.
+        
+        .. code-block:: python
+        
+            INSTALLED_APPS = (
+                ...
+                'rest_framework',
+                'drf_generators',
+                ...
+            )
+        
+        *Note*: In order to use the APIView classes, you must have the rest framework DEFAULT_PAGINATION_CLASS and PAGE_SIZE set.
+        
+        .. code-block:: python
+        
+            REST_FRAMEWORK = {
+                'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
+                'PAGE_SIZE': 15
+            }
+        
+        -----------------
+        
+        =====
+        Usage
+        =====
+        
+        To use the generators, run the following command, where ``app`` is the application to generate an API for.
+        
+        .. code-block:: bash
+        
+           $ python manage.py generate {app} {options}
+        
+        ========================== ===================================================
+        Option                     Action
+        ========================== ===================================================
+        ``--serializers``          Generate only Serializers for your app.
+        ``--views``                Generate only Views for your app.
+        ``--urls``                 Generate only urls for your app.
+        ``--force``                Overwrite existing files without the warning prompt.
+        ``-f``, ``--format``       Format to use when generating views and urls. Valid options: ``viewset``, ``apiview``, ``function``, ``modelviewset``. Default: ``viewset``.
+        ``-d``, ``--depth``        Serialization depth for related models. Default: 0
+        ========================== ===================================================
+        
+        **Example:** Generate everything for the app ``api`` with function style views, overwriting existing files, with a serialization depth of 2.
+        
+        .. code-block:: bash
+        
+            $ python manage.py generate api --format function --force -- depth=2
+        
+        -------------------
+        
+        ===========
+        Serializers
+        ===========
+        
+        Drf Generators will create ``serializers.py`` for your application. It currently uses rest framework's ``ModelSerializer`` for serialization of the models defined in ``models.py``.
+        
+        .. code-block:: python
+        
+            class ModelSerializer(serializers.ModelSerializer):
+        
+                class Meta:
+                    model = User
+        
+        ------------------
+        
+        =====
+        Views
+        =====
+        
+        DRF Generators will create ``views.py`` for your application. It can generate ``ViewSet``, ``APIView`` and function based views. Set the ``--format`` option when running the generator to pick the preferred style
+        
+        -------
+        ViewSet
+        -------
+        
+        ``python manage.py generate api  --format viewset``
+        
+        .. code-block:: python
+        
+            class ModelViewSet(ViewSet):
+        
+                def list(self, request):
+                    ...
+                def create(self, request):
+                    ...
+                def retrieve(self, request, pk=None):
+                    ...
+                def update(self, request, pk=None):
+                    ...
+                def destroy(self, request, pk=None):
+                    ...
+        
+        -------
+        APIView
+        -------
+        
+        ``python manage.py generate api --format apiview``
+        
+        .. code-block:: python
+        
+            class ModelAPIView(APIView):
+        
+                def get(self, request, id, format=None):
+                    ...
+                def put(self, request, id, format=None):
+                    ...
+                def delete(self, request, id, format=None):
+                    ...
+        
+            class ModelAPIListView(APIView):
+        
+                def get(self, request, format=None):
+                    ...
+                def post(self, request, format=None):
+                    ...
+        
+        --------
+        Function
+        --------
+        
+        ``python manage.py generate api --format function``
+        
+        .. code-block:: python
+        
+            @api_view(['GET', 'POST'])
+            def model_list(request):
+                if request.method == 'GET':
+                    ...
+                elif request.method == 'POST':
+                    ...
+        
+            @api_view(['GET', 'PUT', 'DELETE'])
+            def model_detail(request, pk):
+                if request.method == 'GET':
+                    ...
+                elif request.method == 'PUT':
+                    ...
+                elif request.method == 'DELETE':
+                    ...
+        
+        -------------
+        ModelViewSet
+        -------------
+        
+        ``python manage.py generate api --format modelviewset``
+        
+        .. code-block:: python
+        
+            class MyModelViewSet(ModelViewSet):
+                queryset = MyModel.objects.all()
+                serializer_class = MyModelSerializer
+        
+        -----------------
+        
+        ====
+        Urls
+        ====
+        
+        Finally, DRF Generator will create you a default ``urls.py`` to match the View format you are using.
+        
+        ----------------------------
+        ViewSet & ModeViewSet Routes
+        ----------------------------
+        
+        .. code-block:: python
+        
+            router = SimpleRouter()
+        
+            router.register(r'model', views.ModelViewSet, 'Model')
+        
+            urlpatterns = router.urls
+        
+        ------------
+        APIView urls
+        ------------
+        
+        .. code-block:: python
+        
+            url(r'^model/([0-9]+)$', views.ModelAPIView.as_view()),
+            url(r'^model', views.ModelAPIListView.as_view()),
+        
+        -------------
+        Function urls
+        -------------
+        
+        .. code-block:: python
+        
+            urlpatterns = [
+        
+                url(r'^model/(?P<pk>[0-9]+)$', views.model_detail),
+                url(r'^model/$', views.model_list),
+        
+            ]
+        
+            urlpatterns = format_suffix_patterns(urlpatterns)
+        
+        
+        =====
+        Tests
+        =====
+        
+        A full application built with drf-generators can be found in the `tests directory <http://github.com/brobin/drf-generators/tree/master/tests>`_. Instructions on running the tests can be found in the test project's README.
+        
+        
+        =======
+        License
+        =======
+        
+        MIT License. See `LICENSE <https://github.com/brobin/drf-generators/blob/master/LICENSE>`_.
+        
+        
+        .. |python| image:: https://img.shields.io/pypi/v/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: Supported Python versions
+        
+        .. |pypi| image:: https://img.shields.io/pypi/pyversions/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: Latest Version
+        
+        .. |license| image:: https://img.shields.io/pypi/l/drf-generators.svg?style=flat-square
+            :target: https://pypi.python.org/pypi/drf-generators/
+            :alt: License
+        
+        .. |travis| image:: https://img.shields.io/travis/Brobin/drf-generators.svg?style=flat-square
+            :target: https://travis-ci.org/Brobin/drf-generators/
+            :alt: Travis CI
+        
+        .. |django| image:: https://img.shields.io/badge/Django-1.7, 1.8-orange.svg?style=flat-square
+            :target: http://djangoproject.com/
+            :alt: Django 1.7, 1.8
+        
+        .. |drf| image:: https://img.shields.io/badge/DRF-3.2, 3.2-orange.svg?style=flat-square
+            :target: http://www.django-rest-framework.org/
+            :alt: DRF 3.0, 3.1
+        
+Keywords: API REST framework generate scaffold
+Platform: UNKNOWN
+Classifier: Environment :: Web Environment
+Classifier: Framework :: Django :: 1.7
+Classifier: Framework :: Django :: 1.8
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Natural Language :: English
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Internet :: WWW/HTTP
diff --git a/drf_generators.egg-info/SOURCES.txt b/drf_generators.egg-info/SOURCES.txt
new file mode 100644
index 0000000..1bed2a6
--- /dev/null
+++ b/drf_generators.egg-info/SOURCES.txt
@@ -0,0 +1,19 @@
+README.rst
+setup.cfg
+setup.py
+drf_generators/__init__.py
+drf_generators/generators.py
+drf_generators.egg-info/PKG-INFO
+drf_generators.egg-info/SOURCES.txt
+drf_generators.egg-info/dependency_links.txt
+drf_generators.egg-info/requires.txt
+drf_generators.egg-info/top_level.txt
+drf_generators/management/__init__.py
+drf_generators/management/commands/__init__.py
+drf_generators/management/commands/generate.py
+drf_generators/templates/__init__.py
+drf_generators/templates/apiview.py
+drf_generators/templates/function.py
+drf_generators/templates/modelviewset.py
+drf_generators/templates/serializer.py
+drf_generators/templates/viewset.py
\ No newline at end of file
diff --git a/drf_generators.egg-info/dependency_links.txt b/drf_generators.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/drf_generators.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/drf_generators.egg-info/requires.txt b/drf_generators.egg-info/requires.txt
new file mode 100644
index 0000000..dcc00f4
--- /dev/null
+++ b/drf_generators.egg-info/requires.txt
@@ -0,0 +1 @@
+Django>=1.7
\ No newline at end of file
diff --git a/drf_generators.egg-info/top_level.txt b/drf_generators.egg-info/top_level.txt
new file mode 100644
index 0000000..0a7bef3
--- /dev/null
+++ b/drf_generators.egg-info/top_level.txt
@@ -0,0 +1 @@
+drf_generators
diff --git a/drf_generators/__init__.py b/drf_generators/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/drf_generators/generators.py b/drf_generators/generators.py
new file mode 100644
index 0000000..d9244df
--- /dev/null
+++ b/drf_generators/generators.py
@@ -0,0 +1,116 @@
+
+from django.template import Template, Context
+import os.path
+
+from drf_generators.templates.serializer import SERIALIZER
+from drf_generators.templates.apiview import API_URL, API_VIEW
+from drf_generators.templates.viewset import VIEW_SET_URL, VIEW_SET_VIEW
+from drf_generators.templates.function import FUNCTION_URL, FUNCTION_VIEW
+from drf_generators.templates.modelviewset import MODEL_URL, MODEL_VIEW
+
... 535 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/drf-generators.git



More information about the Python-modules-commits mailing list