Commit eb35fbe2 authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Added the orders list page

parent 336fc556
...@@ -9,6 +9,7 @@ from .views import RecipesListView ...@@ -9,6 +9,7 @@ from .views import RecipesListView
from .views import RecipesDetailView from .views import RecipesDetailView
from .views import RecipesUpdateView from .views import RecipesUpdateView
from .views import RecipesCreateView from .views import RecipesCreateView
from .views import OrdersListView
urlpatterns = [ urlpatterns = [
path('', HomePageView.as_view()), path('', HomePageView.as_view()),
...@@ -19,5 +20,6 @@ urlpatterns = [ ...@@ -19,5 +20,6 @@ urlpatterns = [
path('recipes-list', RecipesListView.as_view()), path('recipes-list', RecipesListView.as_view()),
path('recipes-detail', RecipesDetailView.as_view()), path('recipes-detail', RecipesDetailView.as_view()),
path('recipes-update', RecipesUpdateView.as_view()), path('recipes-update', RecipesUpdateView.as_view()),
path('recipes-create', RecipesCreateView.as_view()) path('recipes-create', RecipesCreateView.as_view()),
path('orders-list', OrdersListView.as_view())
] ]
...@@ -26,3 +26,6 @@ class RecipesUpdateView(TemplateView): ...@@ -26,3 +26,6 @@ class RecipesUpdateView(TemplateView):
class RecipesCreateView(TemplateView): class RecipesCreateView(TemplateView):
template_name = "recipes_create_form.html" template_name = "recipes_create_form.html"
class OrdersListView(TemplateView):
template_name = "orders_list.html"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div> <div>
<h2 id="home_page_orders">Orders</h2> <h2 id="home_page_orders">Orders</h2>
<form> <form method="get" action="http://localhost:8000/orders-list">
<button type="submit" id="button_to_orders">Check current orders</button> <button type="submit" id="button_to_orders">Check current orders</button>
</form> </form>
</div> </div>
......
<!DOCTYPE html>
<html>
<head>
<title>Orders - List</title>
</head>
<body>
<div>
<h1 id="page_header">Orders - List</h1>
</div>
<div>
<table class="table">
<thead>
<tr>
<th>Order Slips</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>
<form>
<button type="submit" id="button_to_orders_detail">Go to detail</button>
</form>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<form>
<button type="submit" id="button_to_orders_create">Create New Order</button>
</form>
</div>
<div>
<form method="get" action="http://localhost:8000">
<button type="submit" id="back_button">Back to Home</button>
</form>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment