Compare commits
No commits in common. "764d3d8d8579cc2a698156269858a5c5fd83c9da" and "4bc47ebd7994945812286080ce4d01b3dd45fcbe" have entirely different histories.
764d3d8d85
...
4bc47ebd79
@ -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>
|
|
@ -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 %}
|
|
@ -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"),
|
|
||||||
]
|
|
@ -1,18 +1,3 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.http import HttpResponse
|
|
||||||
from django.template import loader
|
|
||||||
|
|
||||||
from .models import Sale
|
# Create your views here.
|
||||||
|
|
||||||
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)
|
|
||||||
|
@ -15,9 +15,8 @@ Including another URLconf
|
|||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import include, path
|
from django.urls import path
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("don_confiao/", include("don_confiao.urls")),
|
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user