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
e269914b
Commit
e269914b
authored
Mar 18, 2020
by
Kirby Ezekiel Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the orders create form page
parent
06025bc7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
3 deletions
+50
-3
urls.py
froyo/urls.py
+3
-1
views.py
froyo/views.py
+3
-0
functional_test.py
functional_test.py
+1
-1
orders_create_form.html
templates/orders_create_form.html
+42
-0
orders_list.html
templates/orders_list.html
+1
-1
No files found.
froyo/urls.py
View file @
e269914b
...
...
@@ -15,6 +15,7 @@ from .views import RecipesCreateView
from
.views
import
OrdersListView
from
.views
import
OrdersDetailView
from
.views
import
OrdersUpdateView
from
.views
import
OrdersCreateView
urlpatterns
=
[
path
(
''
,
HomePageView
.
as_view
()),
...
...
@@ -28,5 +29,6 @@ urlpatterns = [
path
(
'recipes-create'
,
RecipesCreateView
.
as_view
()),
path
(
'orders-list'
,
OrdersListView
.
as_view
()),
path
(
'orders-detail'
,
OrdersDetailView
.
as_view
()),
path
(
'orders-update'
,
OrdersUpdateView
.
as_view
())
path
(
'orders-update'
,
OrdersUpdateView
.
as_view
()),
path
(
'orders-create'
,
OrdersCreateView
.
as_view
())
]
froyo/views.py
View file @
e269914b
...
...
@@ -35,3 +35,6 @@ class OrdersDetailView(TemplateView):
class
OrdersUpdateView
(
TemplateView
):
template_name
=
"orders_update_form.html"
class
OrdersCreateView
(
TemplateView
):
template_name
=
"orders_create_form.html"
functional_test.py
View file @
e269914b
...
...
@@ -350,7 +350,7 @@ class NewVisitorTest(unittest.TestCase):
back_button_to_home_from_orders
.
click
()
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000"
,
"http://localhost:8000
/
"
,
self
.
browser
.
current_url
)
...
...
templates/orders_create_form.html
0 → 100644
View file @
e269914b
<!DOCTYPE html>
<html>
<head>
<title>
Orders - Create
</title>
</head>
<body>
<div>
<h1
id=
"page_header"
>
Orders - Create
</h1>
</div>
<div>
<form>
<div>
<label>
Customer Name
</label>
<input
type=
"text"
placeholder=
"Insert name of the customer"
>
</div>
<div>
<label>
Size
</label>
<input
type=
"text"
placeholder=
"Insert size"
>
</div>
<div>
<label>
Base Recipe
</label>
<input
type=
"text"
placeholder=
"Insert base recipe"
>
</div>
<div>
<label>
Customization
</label>
<input
type=
"text"
placeholder=
"Insert customization"
>
</div>
<div>
<button
type=
"submit"
>
Confirm Order
</button>
</div>
</form>
</div>
<div>
<form
method=
"get"
action=
"http://localhost:8000/orders-list"
>
<button
type=
"submit"
id=
"back_button"
>
Back to List
</button>
</form>
</div>
</body>
</html>
templates/orders_list.html
View file @
e269914b
...
...
@@ -31,7 +31,7 @@
</div>
<div>
<form>
<form
method=
"get"
action=
"http://localhost:8000/orders-create"
>
<button
type=
"submit"
id=
"button_to_orders_create"
>
Create New Order
</button>
</form>
</div>
...
...
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