Recipe Pages¶
-
class
recipes.views.recipe_pages.RecipeViewSet(**kwargs) Bases:
rest_framework.viewsets.ViewSetThis view set provides two page views, a “list” view which shows all the recipes and a “detail” view which shows just a single recipe
-
list(request) Retrieves a list of recipes and renders them in a template
Parameters: request – An http request object Returns: Rendered HTML
-
retrieve(request, pk=None) Retrieves a single recipe and renders it in a template
Parameters: - request – An http request object
- pk – The pk for the recipe of interest
Returns: Rendered HTML
-