Commit 1553b6cf authored by Kirby Ezekiel Santos's avatar Kirby Ezekiel Santos

Added the recipe detail page

parent 6e631641
...@@ -6,6 +6,7 @@ from .views import IngredientsDetailView ...@@ -6,6 +6,7 @@ from .views import IngredientsDetailView
from .views import IngredientsUpdateView from .views import IngredientsUpdateView
from .views import IngredientsCreateView from .views import IngredientsCreateView
from .views import RecipesListView from .views import RecipesListView
from .views import RecipesDetailView
urlpatterns = [ urlpatterns = [
path('', HomePageView.as_view()), path('', HomePageView.as_view()),
...@@ -13,5 +14,6 @@ urlpatterns = [ ...@@ -13,5 +14,6 @@ urlpatterns = [
path('ingredients-detail', IngredientsDetailView.as_view()), path('ingredients-detail', IngredientsDetailView.as_view()),
path('ingredients-update', IngredientsUpdateView.as_view()), path('ingredients-update', IngredientsUpdateView.as_view()),
path('ingredients-create', IngredientsCreateView.as_view()), path('ingredients-create', IngredientsCreateView.as_view()),
path('recipes-list', RecipesListView.as_view()) path('recipes-list', RecipesListView.as_view()),
path('recipes-detail', RecipesDetailView.as_view())
] ]
...@@ -17,3 +17,6 @@ class IngredientsCreateView(TemplateView): ...@@ -17,3 +17,6 @@ class IngredientsCreateView(TemplateView):
class RecipesListView(TemplateView): class RecipesListView(TemplateView):
template_name = "recipes_list.html" template_name = "recipes_list.html"
class RecipesDetailView(TemplateView):
template_name = "recipes_detail.html"
<!DOCTYPE html>
<html>
<head>
<title>Recipes - Detail</title>
</head>
<body>
<div>
<h1 id="page_header">Recipes - Detail</h1>
</div>
<div>
<table class="table">
<thead>
<tr>
<th>Ingredient</th>
<th>Qty Needed</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div>
<form>
<button type="submit" id="button_to_recipes_update">Update Fields</button>
</form>
</div>
<div>
<form method="get" action="http://localhost:8000/recipes-list">
<button type="submit" id="back_button">Back to List</button>
</form>
</div>
</body>
</html>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<tr> <tr>
<td></td> <td></td>
<td> <td>
<form> <form method="get" action="http://localhost:8000/recipes-detail">
<button type="submit" id="button_to_recipes_detail">Go to detail</button> <button type="submit" id="button_to_recipes_detail">Go to detail</button>
</form> </form>
</td> </td>
......
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