Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frozen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSE6
frozen
Commits
f015cd55
Commit
f015cd55
authored
2 years ago
by
Arno Wunderlich
Browse files
Options
Downloads
Patches
Plain Diff
data from db and error fixing in template
parent
7050a217
No related branches found
No related tags found
1 merge request
!19
data from db and error fixing in template
Pipeline
#14211
passed
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tjts5901/templates/listBid.html
+10
-10
10 additions, 10 deletions
src/tjts5901/templates/listBid.html
src/tjts5901/views.py
+12
-2
12 additions, 2 deletions
src/tjts5901/views.py
with
22 additions
and
12 deletions
src/tjts5901/templates/listBid.html
+
10
−
10
View file @
f015cd55
...
...
@@ -2,7 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<title>
Add
item
</title>
<title>
View
item
s
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD"
crossorigin=
"anonymous"
>
<script>
function
bid
(){
...
...
@@ -24,24 +24,24 @@
</head>
<body>
<header>
<h2>
Overview over items currently on sale
</h2>
<br>
</header>
<main>
<div
class=
"list-group container"
>
<!--
for item in items
.items-->
{%
for item in items
%}
<div
class=
"d-flex w-100 justify-content-between mb-4"
>
<img
class=
" col-md-2 col-xs-2"
src=
"Gaming_5000x3125.jpg"
{{
item.image
}}
alt=
"Image"
/>
<a
href=
"#"
class=
"list-group-item list-group-item-action"
aria-current=
"true"
>
<div
class=
"d-flex w-100 justify-content-between"
>
<h5
class=
"mb-1"
>
<!--item name-->
Item 1
</h5>
<small>
<!--creation date-->
3 days ago
</small>
<h5
class=
"mb-1"
>
{{ item.title }}
</h5>
<small>
{{ item.created_at }}
</small>
</div>
<p
class=
"mb-1"
>
D
escription
</p>
<small>
Current bid
</small>
<div
class=
"row"
><button
class=
"col-md-2"
onclick=
"bid()"
>
Bid
</button><form
method=
"post"
action=
"#"
class=
"col-md-4"
><input
id=
"bid"
type=
"hidden"
min=
"{{starting
price
}}"
/></form></div>
<p
class=
"mb-1"
>
{{ item.d
escription
}}
</p>
<small>
{{ item.starting_bid }}
</small>
<div
class=
"row"
><button
class=
"col-md-2"
onclick=
"bid()"
>
Bid
</button><form
method=
"post"
action=
"#"
class=
"col-md-4"
><input
id=
"bid"
type=
"hidden"
min=
"{{
item.
starting
_bid
}}"
/></form></div>
</a>
</div>
<!--
end
for
-->
{%
endfor
%}
</div>
</main>
<footer>
...
...
This diff is collapsed.
Click to expand it.
src/tjts5901/views.py
+
12
−
2
View file @
f015cd55
...
...
@@ -103,9 +103,19 @@ def adding_successful():
@bp.route
(
"
/listBid
"
)
def
list_bid
():
"""
listBid page.
page that lists all items currently on auction
"""
# for test reasons all items are shown and no selection on only on sale items
items
=
Item
.
objects
.
all
()
html
=
render_template
(
"
listBid.html
"
)
html
=
render_template
(
"
listBid.html
"
,
items
=
items
)
return
html
@bp.route
(
"
/bid
"
)
def
bid
(
id
):
"""
method that saves bid on object
"""
return
"
ok
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment