Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #6

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ee67608
Cambios
JuanCamiloEduardo Mar 26, 2022
9d26113
Cambios
JuanCamiloEduardo Mar 26, 2022
c9947aa
Psicologo y CIta
LuisaFuentesL Mar 27, 2022
0b40d0b
Psicologo y Cita
LuisaFuentesL Mar 27, 2022
8b0c507
psicologo y cita
LuisaFuentesL Mar 27, 2022
4875dbf
Merge pull request #1 from LuisaFuentesL/master
JuanCamiloEduardo Mar 27, 2022
2f3ec2c
prueba conexion
LuisaFuentesL Mar 27, 2022
ab5594d
cambio return psicologo
LuisaFuentesL Mar 27, 2022
fce7e63
correccion length
LuisaFuentesL Mar 28, 2022
fc41c30
admin cita y psicologo
LuisaFuentesL Mar 28, 2022
ba962b2
ok
JuanCamiloEduardo Mar 28, 2022
696234a
acompanante
JuanCamiloEduardo Mar 28, 2022
79bcf86
Merge branch 'master' of https://github.com/Educacion-Estrella/ISIS25…
JuanCamiloEduardo Mar 28, 2022
90d84bb
Merge branch 'master' of https://github.com/Educacion-Estrella/ISIS25…
JuanCamiloEduardo Mar 28, 2022
650a51d
cambios
JuanCamiloEduardo Mar 28, 2022
868c67d
aver
JuanCamiloEduardo Mar 28, 2022
2e4c8b2
urls
JuanCamiloEduardo Mar 28, 2022
8e7885f
urls
JuanCamiloEduardo Mar 28, 2022
2dbbdd5
ok
JuanCamiloEduardo Mar 28, 2022
c89962d
acompanantes
JuanCamiloEduardo Mar 28, 2022
1ebed17
Create README.md
juanCpacheco Mar 29, 2022
bace1c1
Update acompanante_logic.py
JuanCamiloEduardo Mar 29, 2022
3688965
Update acompanante_logic.py
JuanCamiloEduardo Mar 29, 2022
0a53802
Update urls.py
JuanCamiloEduardo Mar 29, 2022
7697b44
Hola
JuanCamiloEduardo Mar 30, 2022
18c6def
Prueba
JuanCamiloEduardo Mar 30, 2022
69a6552
Cambios Forms
JuanCamiloEduardo Mar 30, 2022
05536ad
cambio settings
JuanCamiloEduardo Mar 30, 2022
4482dea
Comentado
JuanCamiloEduardo Mar 30, 2022
4b7095f
base.html
JuanCamiloEduardo Mar 31, 2022
546152f
Update acompanante_logic.py
JuanCamiloEduardo Mar 31, 2022
5672141
Merge branch 'master' of https://github.com/Educacion-Estrella/ISIS25…
JuanCamiloEduardo Mar 31, 2022
0953b81
urls.py
JuanCamiloEduardo Mar 31, 2022
d1b56b2
view.py
JuanCamiloEduardo Mar 31, 2022
3455411
view.py
JuanCamiloEduardo Mar 31, 2022
93352a8
ya esta listo cita con relaciones de acompanante y psicolofo, además …
LuisaFuentesL Apr 4, 2022
a3529e5
relacion de cita con estudianteE
LuisaFuentesL Apr 4, 2022
7c8999c
estudianteEstrella
juanCpacheco Apr 4, 2022
3566797
Correcciones y EstudiantesEstrella completo
juanCpacheco Apr 6, 2022
2228563
acompanante-cita
LuisaFuentesL Apr 6, 2022
5e492ca
boolean field estudiante
LuisaFuentesL Apr 6, 2022
8bc12a3
logic y views cita y psicologo
LuisaFuentesL Apr 7, 2022
f014696
field forms cita arreglados
LuisaFuentesL Apr 7, 2022
cb3044d
labels psicologo
LuisaFuentesL Apr 7, 2022
6dc7542
gets psicologo arreglados
LuisaFuentesL Apr 7, 2022
b1aec8d
s
LuisaFuentesL Apr 7, 2022
616d44e
citas get
LuisaFuentesL Apr 7, 2022
d94f7c6
citas get
LuisaFuentesL Apr 7, 2022
95f754f
cita get
LuisaFuentesL Apr 7, 2022
2716ea3
si
LuisaFuentesL Apr 7, 2022
5b13340
error 1
LuisaFuentesL Apr 7, 2022
147624f
comentario urls monitoring
LuisaFuentesL Apr 7, 2022
b8b90f4
pycache
LuisaFuentesL Apr 7, 2022
8646e50
new db
LuisaFuentesL Apr 7, 2022
c1347bd
prueba
LuisaFuentesL Apr 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions Jmeter-test/Load-tests.jmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
Expand All @@ -23,6 +23,7 @@
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GET Request" enabled="true">
Expand Down Expand Up @@ -165,46 +166,33 @@
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="POST Request" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="variable" elementType="HTTPArgument">
<elementProp name="nombre" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">1</stringProp>
<stringProp name="Argument.value">Luisa</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">variable</stringProp>
<stringProp name="Argument.name">nombre</stringProp>
</elementProp>
<elementProp name="value" elementType="HTTPArgument">
<elementProp name="edad" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">22.1</stringProp>
<stringProp name="Argument.value">19</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">value</stringProp>
</elementProp>
<elementProp name="unit" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">C</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">unit</stringProp>
</elementProp>
<elementProp name="place" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">ML500</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">place</stringProp>
<stringProp name="Argument.name">edad</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">172.10.10.10</stringProp>
<stringProp name="HTTPSampler.port">8082</stringProp>
<stringProp name="HTTPSampler.domain">172.24.41.134</stringProp>
<stringProp name="HTTPSampler.port">5432</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/measurementcreate/</stringProp>
<stringProp name="HTTPSampler.path">/acompanantecreate/</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ISIS2503-MonitoringApp
Web application for monitoring physical variables in python Djan

Grupo2
Empty file added acompanantes/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions acompanantes/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.contrib import admin
from . models import Acompanante

admin.site.register(Acompanante)
6 changes: 6 additions & 0 deletions acompanantes/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class AcompananteConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'acompanantes'
14 changes: 14 additions & 0 deletions acompanantes/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from django import forms
from .models import Acompanante

class AcompananteForm(forms.ModelForm):
class Meta:
model = Acompanante
fields = [
'nombre',
'edad',
]
labels = {
'nombre': 'Nombre',
'edad': 'Edad',
}
14 changes: 14 additions & 0 deletions acompanantes/logic/acompanante_logic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#HOla

from ..models import Acompanante

def get_acompanante(var_pk):
measurement = Acompanante.objects.get(pk=var_pk)
return measurement

def create_acompanante(form):
acompanante = form.save()
acompanante.save()
return ()

Empty file.
10 changes: 10 additions & 0 deletions acompanantes/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

from django.db import models

class Acompanante(models.Model):

nombre = models.CharField(max_length=50)
edad = models.FloatField(null=True, blank=True, default=None)

def __str__(self):
return '%s %s' % (self.edad, self.nombre)
12 changes: 12 additions & 0 deletions acompanantes/templates/Acompanante/acompananteCreate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends 'base.html' %}

{% block content %}

<form method="POST">

{% csrf_token %}
<br>
{{ form.as_p }}

<button type="submit" class="btn btn-success waves-effect waves-light">Create</button>
<button type="button" class="btn btn-primary waves-effect waves-light"
onClick=" window.location.href='/acompanantes' ">Back
</button>
</form>

{% endblock %}
61 changes: 61 additions & 0 deletions acompanantes/templates/Acompanante/acompanantes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{% extends 'base.html' %}
{% block content %}

<div class="content">
<div class="">
<div class="page-header-title">
<h4 class="page-title">Last Ten Acompanantes</h4>
<!---
<div style="text-align:right;">
<button type="button" class="btn btn-success waves-effect waves-light"
onClick=" window.location.href='/measurementcreate' " style="text-align:center;">+
</button>
</div>
--->
</div>
</div>

<br>

<div class="page-content-wrapper">
<div class="container">
<!-- Content page -->

<div class="panel panel-default">
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr style="color:#0E2EB0">
<!---<th font color="red">Variable</th>--->
<th>Nombre</th>
<th>Edad</th>
</tr>
</thead>
<tbody>

{% for acompanante in acompanante_list %}
<tr>

<td>{{ acompanante.nombre }}</td>
<td>{{ acompanante.edad }}</td>

</tr>
{% endfor %}

</tbody>
</table>

<div style="text-align:center;">
<button type="button" class="btn btn-primary waves-effect waves-light"
onClick=" window.location.href='/' ">
Back
</button>
</div>

</div>
</div>
</div>
</div>
</div>

{% endblock %}
3 changes: 3 additions & 0 deletions acompanantes/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
11 changes: 11 additions & 0 deletions acompanantes/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

from django.urls import path
from django.views.decorators.csrf import csrf_exempt

from . import views

urlpatterns = [
path('acompanantes/', views.acompanante_list),
path('acompanantecreate/', csrf_exempt(views.acompanante_create), name='acompananteCreate'),
]

30 changes: 30 additions & 0 deletions acompanantes/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from django.shortcuts import render
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.urls import reverse
from .forms import AcompananteForm
from .logic.acompanante_logic import get_acompanante, create_acompanante

def acompanante_list(request):
acompanantes = get_acompanante()
context = {
'acompanante_list': acompanantes
}
return render(request, 'Acompanante/acompanante.html', context)

def acompanante_create(request):
if request.method == 'POST':
form = AcompananteForm(request.POST)
if form.is_valid():
create_acompanante(form)
messages.add_message(request, messages.SUCCESS, 'Successfully created acompanante')
return HttpResponseRedirect(reverse('acompananteCreate'))
else:
print(form.errors)
else:
form = AcompananteForm()

context = {
'form': form,
}
return render(request, 'Acompanante/acompananteCreate.html', context)
Empty file added cita/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions cita/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.contrib import admin

from cita.models import Cita

# Register your models here.
admin.site.register(Cita)
6 changes: 6 additions & 0 deletions cita/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CitaConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'cita'
14 changes: 14 additions & 0 deletions cita/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from django import forms
from .models import Cita

class CitaForm(forms.ModelForm):
class Meta:
model = Cita
fields = [
'dateTime',
'plataforma',
]
labels = {
'dateTime': 'DateTime',
'plataforma': 'Plataforma',
}
14 changes: 14 additions & 0 deletions cita/logic/cita_logic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#HOla

from ..models import Cita

def get_cita(var_pk):
queryset = Cita.objects.get(pk=var_pk)
return queryset

def create_cita(form):
cita = form.save()
cita.save()
return ()

Empty file added cita/migrations/__init__.py
Empty file.
18 changes: 18 additions & 0 deletions cita/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from django.db import models

# Create your models here. hola
from psicologo.models import Psicologo
from acompanantes.models import Acompanante
from estudianteEstrella.models import EstudianteEstrella



class Cita(models.Model):
psicologo = models.ForeignKey(Psicologo, on_delete=models.CASCADE, default=None)
acompanantes = models.ForeignKey(Acompanante, on_delete=models.CASCADE, default=None)
estudianteEstrella = models.ForeignKey(EstudianteEstrella, on_delete=models.CASCADE, default=None)
dateTime = models.DateTimeField(auto_now=False, auto_now_add=False)
plataforma = models.CharField(max_length=50)

def __str__(self):
return '%s %s' % (self.dateTime, self.plataforma)
3 changes: 3 additions & 0 deletions cita/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
10 changes: 10 additions & 0 deletions cita/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

from django.urls import path
from django.views.decorators.csrf import csrf_exempt

from . import views

urlpatterns = [
path('cita/', views.cita_list),
path('citacreate/', csrf_exempt(views.cita_create), name='citaCreate'),
]
33 changes: 33 additions & 0 deletions cita/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from django.shortcuts import render

# Create your views here.
from django.shortcuts import render
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.urls import reverse
from .forms import CitaForm
from .logic.cita_logic import get_cita, create_cita

def cita_list(request):
cita = get_cita()
context = {
'cita_list': cita
}
return render(request, 'Cita/cita.html', context)

def cita_create(request):
if request.method == 'POST':
form = CitaForm(request.POST)
if form.is_valid():
create_cita(form)
messages.add_message(request, messages.SUCCESS, 'Successfully created cita')
return HttpResponseRedirect(reverse('citaCreate'))
else:
print(form.errors)
else:
form = CitaForm()

context = {
'form': form,
}
return render(request, 'Cita/citaCreate.html', context)
Empty file added estudianteEstrella/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions estudianteEstrella/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.contrib import admin
from . models import EstudianteEstrella

admin.site.register(EstudianteEstrella)
6 changes: 6 additions & 0 deletions estudianteEstrella/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class EstudianteestrellaConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'estudianteEstrella'
Loading