Compare commits

..

No commits in common. "764d3d8d8579cc2a698156269858a5c5fd83c9da" and "4bc47ebd7994945812286080ce4d01b3dd45fcbe" have entirely different histories.

5 changed files with 2 additions and 42 deletions

View File

@ -1,6 +0,0 @@
<h1>Tienda la Ilusión</h1>
<h2>Don Confiao</h2>
<ul>
<li><a href='./comprar'>Comprar</a></li>
<li><a href='./compras'>Compras</a></li>
</ul>

View File

@ -1,9 +0,0 @@
{% if purchases %}
<ul>
{% for purchase in purchases %}
<li><a href="/don_confiao/{{ purchase.id }}/">{{ purchase.date }}, {{ purchase.customer }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No hay Compras</p>
{% endif %}

View File

@ -1,9 +0,0 @@
from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="wellcome"),
path("comprar", views.buy, name="buy"),
path("compras", views.purchases, name="purchases"),
]

View File

@ -1,18 +1,3 @@
from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from .models import Sale
def index(request):
return render(request, 'don_confiao/index.html')
def buy(request):
return HttpResponse("Nombre: ....")
def purchases(request):
purchases = Sale.objects.all()
context = {
"purchases": purchases,
}
return render(request, 'don_confiao/purchases.html', context)
# Create your views here.

View File

@ -15,9 +15,8 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path
from django.urls import path
urlpatterns = [
path("don_confiao/", include("don_confiao.urls")),
path('admin/', admin.site.urls),
]