chartManD commited on
Commit
6562745
·
1 Parent(s): 4e10145

Creacion template panel configuracion y reseteo de tablas en base de datos

Browse files
tecnicas/controllers/tecnica_controller.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+
2
+ class TecnicaController():
3
+ def __init__(self):
4
+ pass
5
+
6
+ def getTypesTechnique(self):
7
+ pass
8
+ pass
tecnicas/migrations/0002_remove_listapalabra_id_atributos_and_more.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by Django 5.2.1 on 2025-07-09 21:15
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ('tecnicas', '0001_initial'),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.RemoveField(
14
+ model_name='listapalabra',
15
+ name='id_atributos',
16
+ ),
17
+ migrations.RemoveField(
18
+ model_name='escala',
19
+ name='etiquetas',
20
+ ),
21
+ migrations.RemoveField(
22
+ model_name='esvocabulario',
23
+ name='id_estilo',
24
+ ),
25
+ migrations.RemoveField(
26
+ model_name='tecnica',
27
+ name='id_estilo',
28
+ ),
29
+ migrations.RemoveField(
30
+ model_name='esvocabulario',
31
+ name='id_vocabulario',
32
+ ),
33
+ migrations.RemoveField(
34
+ model_name='listapalabra',
35
+ name='id_palabra',
36
+ ),
37
+ migrations.RemoveField(
38
+ model_name='vocabulario',
39
+ name='palabras',
40
+ ),
41
+ migrations.RemoveField(
42
+ model_name='sesionsensorial',
43
+ name='creadoPor',
44
+ ),
45
+ migrations.RemoveField(
46
+ model_name='producto',
47
+ name='id_sesion',
48
+ ),
49
+ migrations.RemoveField(
50
+ model_name='sesionsensorial',
51
+ name='tecnica',
52
+ ),
53
+ migrations.DeleteModel(
54
+ name='EsAtributo',
55
+ ),
56
+ migrations.DeleteModel(
57
+ name='Escala',
58
+ ),
59
+ migrations.DeleteModel(
60
+ name='Etiqueta',
61
+ ),
62
+ migrations.DeleteModel(
63
+ name='EstiloPalabra',
64
+ ),
65
+ migrations.DeleteModel(
66
+ name='EsVocabulario',
67
+ ),
68
+ migrations.DeleteModel(
69
+ name='ListaPalabra',
70
+ ),
71
+ migrations.DeleteModel(
72
+ name='Palabra',
73
+ ),
74
+ migrations.DeleteModel(
75
+ name='Vocabulario',
76
+ ),
77
+ migrations.DeleteModel(
78
+ name='Presentador',
79
+ ),
80
+ migrations.DeleteModel(
81
+ name='Producto',
82
+ ),
83
+ migrations.DeleteModel(
84
+ name='SesionSensorial',
85
+ ),
86
+ migrations.DeleteModel(
87
+ name='Tecnica',
88
+ ),
89
+ ]
tecnicas/models/__init__.py CHANGED
@@ -1,14 +1,15 @@
1
- from .presentador import Presentador
2
- from .palabra import Palabra
3
- from .vocabulario import Vocabulario
4
- from .estilo_palabra import EstiloPalabra
5
- from .es_atributo import EsAtributo
6
- from .lista_palabra import ListaPalabra
7
- from .es_vocabulario import EsVocabulario
8
- from .tecnica import Tecnica
9
- from .sesion_sensorial import SesionSensorial
 
10
 
11
- from .producto import Producto
12
- from .etiqueta import Etiqueta
13
- from .tipo_escala import TipoEscala
14
  # from .escala import Escala
 
1
+ # from .presentador import Presentador
2
+ # from .palabra import Palabra
3
+ # from .vocabulario import Vocabulario
4
+ # from .estilo_palabra import EstiloPalabra
5
+ # from .es_atributo import EsAtributo
6
+ # from .lista_palabra import ListaPalabra
7
+ # from .es_vocabulario import EsVocabulario
8
+ # from .tipo_tecnica import TipoTecnica
9
+ # from .tecnica import Tecnica
10
+ # from .sesion_sensorial import SesionSensorial
11
 
12
+ # from .producto import Producto
13
+ # from .etiqueta import Etiqueta
14
+ # from .tipo_escala import TipoEscala
15
  # from .escala import Escala
tecnicas/models/escala.py CHANGED
@@ -1,12 +1,12 @@
1
- # from django.db import models
2
 
3
- # from .etiqueta import Etiqueta
4
- # from .tipo_escala import TipoEscala
5
 
6
- # class Escala(models.Model):
7
- # longitud = models.IntegerField()
8
- # id_tipo_escala = models.ForeignKey(TipoEscala)
9
- # etiquetas = models.ManyToManyField(Etiqueta)
10
 
11
- # def __str__(self):
12
- # return self.longitud
 
1
+ from django.db import models
2
 
3
+ from .etiqueta import Etiqueta
4
+ from .tipo_escala import TipoEscala
5
 
6
+ class Escala(models.Model):
7
+ longitud = models.IntegerField()
8
+ id_tipo_escala = models.ForeignKey(TipoEscala)
9
+ etiquetas = models.ManyToManyField(Etiqueta)
10
 
11
+ def __str__(self):
12
+ return self.longitud
tecnicas/models/tecnica.py CHANGED
@@ -1,9 +1,10 @@
1
  from django.db import models
2
 
3
  from .estilo_palabra import EstiloPalabra
 
4
 
5
  class Tecnica(models.Model):
6
- nombre_tecnica = models.CharField(max_length=255)
7
  maximas_repeticiones = models.IntegerField(default=0)
8
  repecion = models.IntegerField(default=0)
9
  limite_catadores = models.IntegerField()
@@ -11,4 +12,4 @@ class Tecnica(models.Model):
11
  id_estilo = models.ForeignKey(EstiloPalabra, on_delete=models.CASCADE, related_name="estilo_tecnica")
12
 
13
  def __str__(self):
14
- return self.nombre_tecnica
 
1
  from django.db import models
2
 
3
  from .estilo_palabra import EstiloPalabra
4
+ from .tipo_tecnica import TipoTecnica
5
 
6
  class Tecnica(models.Model):
7
+ tipo_tecnica = models.ForeignKey(TipoTecnica, on_delete=models.CASCADE, related_name="tecnica_tipo_tecnica")
8
  maximas_repeticiones = models.IntegerField(default=0)
9
  repecion = models.IntegerField(default=0)
10
  limite_catadores = models.IntegerField()
 
12
  id_estilo = models.ForeignKey(EstiloPalabra, on_delete=models.CASCADE, related_name="estilo_tecnica")
13
 
14
  def __str__(self):
15
+ return self.tipo_tecnica
tecnicas/models/tipo_tecnica.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from django.db import models
2
+
3
+ class TipoTecnica(models.Model):
4
+ nombre_tecnica = models.CharField(max_length=255)
5
+
6
+ def __str__(self):
7
+ return self.nombre_tecnica
tecnicas/templates/tecnicas/seleccion-tecnica.html CHANGED
@@ -3,4 +3,18 @@
3
  {% block title %}Panel principal{% endblock %}
4
 
5
  {% block content %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  {% endblock %}
 
3
  {% block title %}Panel principal{% endblock %}
4
 
5
  {% block content %}
6
+ <article class="w-full flex flex-col justify-center items-center bg-gray-600 mt-10 mb-10">
7
+ <article class="flex flex-col gap-8 bg-gray-400 p-10 rounded-2xl w-4xl">
8
+ <header class="text-center flex flex-row gap-8 items-center w-full">
9
+ <div class="bg-gray-600 p-4 text-white rounded-xl flex-1">
10
+ <h1 class="font-bold text-2xl">Selección de<br>técnica sensorial</h1>
11
+ </div>
12
+ <div class="flex-1">
13
+ <a href="{% url 'cata_system:index' %}"
14
+ class="text-white bg-blue-600 hover:bg-blue-700 active:outline-none active:ring-4 active:ring-blue-300 font-medium rounded-xl text-xl p-4 text-center uppercase">Panel
15
+ principal</a>
16
+ </div>
17
+ </header>
18
+ </article>
19
+ </article>
20
  {% endblock %}
tecnicas/views.py CHANGED
@@ -1,5 +1,4 @@
1
  from django.shortcuts import render
2
- import array as ar
3
 
4
  # Create your views here.
5
  def mainPanel(req):
@@ -25,8 +24,12 @@ def sesionesPanel(req):
25
  return render(req, "tecnicas/sesiones-panel.html", context={"elementos":elementos})
26
 
27
  def selecionTecnica(req):
 
 
28
  return render(req, "tecnicas/seleccion-tecnica.html")
29
 
 
 
30
  class Presente():
31
  def __init__(self, id, nombre):
32
  self.id = id
 
1
  from django.shortcuts import render
 
2
 
3
  # Create your views here.
4
  def mainPanel(req):
 
24
  return render(req, "tecnicas/sesiones-panel.html", context={"elementos":elementos})
25
 
26
  def selecionTecnica(req):
27
+ tipos = []
28
+
29
  return render(req, "tecnicas/seleccion-tecnica.html")
30
 
31
+ # Auxiliar classes
32
+
33
  class Presente():
34
  def __init__(self, id, nombre):
35
  self.id = id