Proper way to consume data from RESTFUL API in django

前端 未结 4 755
迷失自我
迷失自我 2020-11-30 17:55

I\'m trying to learn django so while I have a current solution I\'m not sure if it follows best practices in django. I would like to display information from a web api on my

4条回答
  •  渐次进展
    2020-11-30 18:34

     
                    {% if libros %}
                    {% for libro in libros %}
                    
                        {{ libro.id }}
                        {{ libro.titulo }}
                        {{ libro.autor }}
                        {{ libro.eiditorial }}
                        {{ libro.descripcion }}
                        {{ libro.cantidad }}
                        {{ libro.Bodega.nombre }}
                        
                            {% if libro.imagen %}
                        
                        {% else %}
                        
    no hay imagen de libros
    {% endif %} Editar Eliminar {% endfor %} {% else %}

    no hay registros de libros

    {% endif%}

    as I can call it in an html when I already have a list of my local application greetings

提交回复
热议问题