-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e21a5f0
commit 10fe807
Showing
28 changed files
with
89 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
'autenticacion', | ||
'crispy_forms', | ||
'pedidos', | ||
'dolar', | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from django.shortcuts import render, HttpResponse | ||
from carro.carro import Carro | ||
|
||
def home(request): | ||
carro = Carro(request) | ||
return render(request, "ProyectoWebApp/home.html") |
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class DolarConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'dolar' |
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends "ProyectoWebApp/base.html" %} | ||
{% load static %} | ||
{% block content %} | ||
|
||
<table class="table table-bordered" style="color: white"> | ||
<thead> | ||
<tr> | ||
<th colspan="4" class="text-center">U$S</th> | ||
</tr> | ||
<tr> | ||
<th>COTIZACION</th> | ||
<th>FECHA</th> | ||
<th>COMPRA</th> | ||
<th>VENTA</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for key,value in cotizacion.items %} | ||
<tr class="text-center"> | ||
<th scope="row">{{key | upper}}</th> | ||
<td>{{value.fecha}}</td> | ||
<td>{{value.compra}}</td> | ||
<td>{{value.venta}}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django import urls | ||
from django.contrib import admin | ||
from django.urls import path, include | ||
from . import views | ||
|
||
urlpatterns = [ | ||
path('', views.cotizacion, name= 'dolar'), | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from django.shortcuts import render | ||
import requests | ||
|
||
def cotizacion(request): | ||
oficial = requests.get('https://api-dolar-argentina.herokuapp.com/api/dolaroficial') | ||
blue = requests.get('https://api-dolar-argentina.herokuapp.com/api/dolarblue') | ||
liqui = requests.get('https://api-dolar-argentina.herokuapp.com/api/contadoliqui') | ||
turista = requests.get('https://api-dolar-argentina.herokuapp.com/api/dolarturista') | ||
bolsa = requests.get('https://api-dolar-argentina.herokuapp.com/api/dolarbolsa') | ||
r1 = oficial.json() | ||
r2 = blue.json() | ||
r3 = liqui.json() | ||
r4 = turista.json() | ||
r5 = bolsa.json() | ||
resultados = { | ||
"oficial":r1, | ||
"blue":r2, | ||
"liqui":r3, | ||
"turista":r4, | ||
"bolsa":r5 | ||
} | ||
context = {'cotizacion':resultados} | ||
return render(request, "dolar/dolar.html",context) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
from django.urls import path | ||
|
||
from .import views | ||
|
||
|
||
urlpatterns = [ | ||
|
||
|
||
urlpatterns = [ | ||
path('',views.tienda, name="Tienda"), | ||
|
||
|
||
] | ||
|
||
|
||
|
||
] |