Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606837915-practice
Commits
2911c42e
Commit
2911c42e
authored
Oct 02, 2019
by
Izzatul Muttaqin
Browse files
Rewrite tutorial-2 with refactor to match test
parent
65d3ac86
Pipeline
#21484
failed with stage
in 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
practice/templates/homepage/home.html
View file @
2911c42e
...
...
@@ -16,4 +16,4 @@
{% endfor %}
</table>
</body>
</html>
</html>
\ No newline at end of file
practice/views.py
View file @
2911c42e
...
...
@@ -5,7 +5,7 @@ from .helper import counter_comment
def
home_page
(
request
):
if
request
.
method
==
'POST'
:
Item
.
objects
.
create
(
text
=
request
.
POST
[
'item_text'
])
return
redirect
(
'/
lists/
'
)
return
redirect
(
'/'
)
items
=
Item
.
objects
.
all
()
comment
=
counter_comment
(
Item
.
objects
.
count
())
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment