Compare commits
No commits in common. "a466d8b20a6d9d5989fa689ea94597376b0971a9" and "72da42991be08c2cd9f16c26bcd94ed66ae52067" have entirely different histories.
a466d8b20a
...
72da42991b
@ -1,43 +0,0 @@
|
||||
<!doctype html>
|
||||
<form action="{% url 'buy'%}" method="POST">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>Purchase</legend>
|
||||
<label for="customer">Customer</label>:
|
||||
<input type="search" name="customer" id="customer"/>
|
||||
|
||||
<label for="date">Date</label>:
|
||||
<input type="date" name="date" id="date"/>
|
||||
|
||||
<label for="description">Description</label>:
|
||||
<input type="text" name="description" id="description"/>
|
||||
|
||||
<fieldset>
|
||||
<legend>Purchase Line</legend>
|
||||
<label for="product">Product</label>:
|
||||
<input type="search" name="product" id="product"/>
|
||||
|
||||
<label for="unit_price">Unit Price</label>:
|
||||
<input type="number" name="unit_price" min="0" id="unit_price"/>
|
||||
|
||||
<label for="quantity">Quantity</label>:
|
||||
<input type="number" name="quantity" min="0" id="quantity"/>
|
||||
|
||||
<label for="subtotal">Subtotal</label>:
|
||||
<input type="number" name="subtotal" min="0" id="line_amount"/>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="total_amount">Total</label>:
|
||||
<input type="number" name="total_amount" min="0" id="total_amount"/>
|
||||
|
||||
<label for="Paid">Paid:</label>
|
||||
<select id="paid" name="paid">
|
||||
<option value="yes">Yes</option>
|
||||
<option value="no">No</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
<div class="button-container">
|
||||
<button name="form" type="submit">Enviar</button>
|
||||
</div>
|
||||
</form>
|
@ -13,13 +13,7 @@ def index(request):
|
||||
|
||||
|
||||
def buy(request):
|
||||
context = {}
|
||||
if request.POST:
|
||||
raise Exception(request.POST)
|
||||
else:
|
||||
raise Exception(request.POST)
|
||||
return render(
|
||||
request, 'don_confiao/purchase.html', context)
|
||||
return HttpResponse("Nombre: ....")
|
||||
|
||||
|
||||
def purchases(request):
|
||||
@ -44,7 +38,6 @@ def products(request):
|
||||
|
||||
return JsonResponse(rproducts, safe=False)
|
||||
|
||||
|
||||
def import_products(request):
|
||||
if request.method == "POST":
|
||||
form = ImportProductsForm(request.POST, request.FILES)
|
||||
|
@ -17,9 +17,6 @@ Including another URLconf
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
|
||||
|
||||
app_name = "don_confiao"
|
||||
|
||||
urlpatterns = [
|
||||
path("don_confiao/", include("don_confiao.urls")),
|
||||
path('admin/', admin.site.urls),
|
||||
|
Loading…
Reference in New Issue
Block a user