Skip to content

Commit 4e66273

Browse files
Creando nuestro primer listado en Django UPDATE
1 parent 1e5933e commit 4e66273

File tree

6 files changed

+51
-13
lines changed

6 files changed

+51
-13
lines changed

Creando_nuestro_primer_listado_en_django/.idea/workspace.xml

+5-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
{% extends 'body.html'%}
22

33
{% block content %}
4+
<div class="card card-default">
5+
<div class="card-header">
6+
<h3 class="card-title">
7+
<i class="fas fa-search"></i>
8+
{{ title }}
9+
</h3>
10+
</div>
11+
<!-- /.card-header -->
12+
<div class="card-body">
13+
<table class="table">
14+
<thead>
15+
<tr>
16+
<th scope="col">Numero</th>
17+
<th scope="col">Nombre</th>
18+
<th scope="col">Opciones</th>
19+
</tr>
20+
</thead>
21+
<tbody>
22+
{% for c in categorias %}
23+
<tr>
24+
<td> {{ c.id }}<td>
25+
<td> {{ c.name }}<td>
26+
<td>
27+
<button type="button" class="btn btn-primary"></button>
28+
<button type="button" class="btn btn-primary"></button>
29+
<td>
30+
</td>
31+
{% endfor %}
32+
</tbody>
33+
</table>
34+
</div>
35+
<!-- /.card-body -->
36+
</div>
37+
<!-- /.card -->
38+
</div>
439

540
{% endblock %}
641

Creando_nuestro_primer_listado_en_django/core/erp/views/category/views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
def category_list(request):
44
data = {
5-
5+
'title':'Listado de Categorias',
6+
'categorias': Category.objects.all()
67
}
78
return render(request, 'category/list.html', data)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Creando nuestro primer listado en Django
2+
3+
📦 Plantilla para descragar [Themes v3](https://adminlte.io/themes/v3/pages/UI/general.html) <br>
4+
📦 Descargar Iconos 5 [Aversome](https://fontawesome.com/) <br>
5+
📦 Tabla Bootstrap [Bootstrap](https://getbootstrap.com/docs/4.4/content/tables/) <br>
6+
📦 Bootstrap Buttons [Buttons](https://www.w3schools.com/bootstrap4/bootstrap_buttons.asp) <br>
7+
8+

Creando_nuestro_primer_listado_en_django/templates/home.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="x-ua-compatible" content="ie=edge">
8-
<title>AdminLTE 3 | Top Navigation</title>
8+
<title> {{ title }} </title>
99
<!-- Font Awesome Icons -->
1010
<link rel="stylesheet" href="{% static 'lib/adminlte-3.0.4/plugins/font-awesome-5.11.1/css/all.min.css' %}">
1111
<!-- Theme style -->

0 commit comments

Comments
 (0)