documentation update api
This commit is contained in:
parent
de413f1473
commit
bbaedfad33
@ -8,7 +8,11 @@
|
|||||||
{% block userlinks %}
|
{% block userlinks %}
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li>
|
<li>
|
||||||
<a class='navbar-link' rel="noreferrer nofollow" target="_blank" href='https://www.django-rest-framework.org/'>
|
<a class="navbar-link" href="{% url 'docs_api' %}">{% trans 'API Documentation' %}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class='navbar-link' rel="noreferrer nofollow" target="_blank"
|
||||||
|
href='https://www.django-rest-framework.org/'>
|
||||||
Django REST framework
|
Django REST framework
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -24,8 +24,9 @@ from cookbook.serializer import MealPlanSerializer, MealTypeSerializer, RecipeSe
|
|||||||
|
|
||||||
class UserNameViewSet(viewsets.ModelViewSet):
|
class UserNameViewSet(viewsets.ModelViewSet):
|
||||||
"""
|
"""
|
||||||
list:
|
list:
|
||||||
optional parameters
|
optional parameters
|
||||||
|
|
||||||
- **filter_list**: array of user id's to get names for
|
- **filter_list**: array of user id's to get names for
|
||||||
"""
|
"""
|
||||||
queryset = User.objects.all()
|
queryset = User.objects.all()
|
||||||
@ -61,7 +62,9 @@ class MealPlanViewSet(viewsets.ModelViewSet):
|
|||||||
"""
|
"""
|
||||||
list:
|
list:
|
||||||
optional parameters
|
optional parameters
|
||||||
|
|
||||||
- **html_week**: filter for a calendar week (format 2020-W24 as html input type week)
|
- **html_week**: filter for a calendar week (format 2020-W24 as html input type week)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
queryset = MealPlan.objects.all()
|
queryset = MealPlan.objects.all()
|
||||||
serializer_class = MealPlanSerializer
|
serializer_class = MealPlanSerializer
|
||||||
@ -94,6 +97,7 @@ class RecipeViewSet(viewsets.ModelViewSet):
|
|||||||
"""
|
"""
|
||||||
list:
|
list:
|
||||||
optional parameters
|
optional parameters
|
||||||
|
|
||||||
- **query**: search a recipe for a string contained in the recipe name (case in-sensitive)
|
- **query**: search a recipe for a string contained in the recipe name (case in-sensitive)
|
||||||
- **limit**: limits the amount of returned recipes
|
- **limit**: limits the amount of returned recipes
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user