Endpoints ========= /coffee/form/ ############# Creates a model form for a specified model within an application. If a ``pk`` is passed, that particular instance is loaded. Args: - request (:py:class:`HttpRequest`) - app_name (``string``, optional): Name of application, case-sensitive. Defaults to ``None``. - model_name (``string``, optional): Name of model, case-sensitive. Defaults to ``None``. - pk (``int``, optional): Primary key of the model instance you want to modify. Defaults to ``None``. - json (``true``, optional): Entered as ``json=true``, data is returned as ``json`` object instead of a ``html`` object. Defaults to ``None``. **Returns**: .. code-block:: html
.. code-block:: json { "html": "
", "post": "/coffee/form/submit/?app_name=api&model_name=Category&pk=5", "delete": "/coffee/delete/?app_name=api&model_name=Category&pk=5" } /coffee/list/ ############# Creates a paginated list for a specified model within an application. Args: - request (:py:class:`HttpRequest`) - app_name (``string``, optional): Name of application, case-sensitive. Defaults to ``None``. - model_name (``string``, optional): Name of model, case-sensitive. Defaults to ``None``. - json (``true``, optional): Primary key of the model instance you want to modify. Defaults to ``None``. - page_size (``number``, optional): Number of records per page. Defaults to ``None``. - page (``number``, optional): Offsets the queryset by the specified page. Defaults to ``None``. - pagination (``true``, optional): Enables pagination to be rendered within the returned list. Defaults to ``None``. **Returns**: .. code-block:: html
id name
1 Fruit & Veg
3 Fridge & Deli
4 Bakery
5 Frozen
6 Pantry
7 Beer & Wine
8 Drinks
9 Health & Body
10 Household
11 Baby & Child
12 Pet
15 Meat & Seafood
.. code-block:: json { "html": "
idname
1Fruit & Veg
3Fridge & Deli
4Bakery
5Frozen
6Pantry
7Beer & Wine
8Drinks
9Health & Body
10Household
11Baby & Child
12Pet
15Meat & Seafood
", "pagination": { "previous": null, "next": null, "current_page": 1, "number_of_pages": 1, "count": 12 } }