Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thegoodplace
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirby Ezekiel Santos
thegoodplace
Commits
1553b6cf
Commit
1553b6cf
authored
Mar 18, 2020
by
Kirby Ezekiel Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the recipe detail page
parent
6e631641
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
2 deletions
+48
-2
urls.py
froyo/urls.py
+3
-1
views.py
froyo/views.py
+3
-0
recipes_detail.html
templates/recipes_detail.html
+41
-0
recipes_list.html
templates/recipes_list.html
+1
-1
No files found.
froyo/urls.py
View file @
1553b6cf
...
...
@@ -6,6 +6,7 @@ from .views import IngredientsDetailView
from
.views
import
IngredientsUpdateView
from
.views
import
IngredientsCreateView
from
.views
import
RecipesListView
from
.views
import
RecipesDetailView
urlpatterns
=
[
path
(
''
,
HomePageView
.
as_view
()),
...
...
@@ -13,5 +14,6 @@ urlpatterns = [
path
(
'ingredients-detail'
,
IngredientsDetailView
.
as_view
()),
path
(
'ingredients-update'
,
IngredientsUpdateView
.
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
())
]
froyo/views.py
View file @
1553b6cf
...
...
@@ -17,3 +17,6 @@ class IngredientsCreateView(TemplateView):
class
RecipesListView
(
TemplateView
):
template_name
=
"recipes_list.html"
class
RecipesDetailView
(
TemplateView
):
template_name
=
"recipes_detail.html"
templates/recipes_detail.html
0 → 100644
View file @
1553b6cf
<!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>
templates/recipes_list.html
View file @
1553b6cf
...
...
@@ -21,7 +21,7 @@
<tr>
<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>
</form>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment