Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
esguerra_lab1
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
James Esguerra
esguerra_lab1
Commits
228ef982
Commit
228ef982
authored
Mar 16, 2021
by
James Esguerra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handled POST request of HomeForm
parent
9e1c35a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
views.cpython-38.pyc
pages/__pycache__/views.cpython-38.pyc
+0
-0
views.py
pages/views.py
+6
-0
home2.html
templates/home2.html
+11
-0
No files found.
pages/__pycache__/views.cpython-38.pyc
View file @
228ef982
No preview for this file type
pages/views.py
View file @
228ef982
...
@@ -4,5 +4,11 @@ from .forms import HomeForm
...
@@ -4,5 +4,11 @@ from .forms import HomeForm
def
ShowHome
(
request
):
def
ShowHome
(
request
):
if
request
.
method
==
'POST'
:
form
=
HomeForm
(
request
.
POST
)
if
form
.
is_valid
():
name
=
form
.
cleaned_data
[
'name'
]
return
render
(
request
,
'home2.html'
,
{
'name'
:
name
})
form
=
HomeForm
()
form
=
HomeForm
()
return
render
(
request
,
'home.html'
,
{
'form'
:
form
})
return
render
(
request
,
'home.html'
,
{
'form'
:
form
})
templates/home2.html
0 → 100644
View file @
228ef982
{% extends 'base.html' %}
{% block title %} Your Bujo {% endblock %}
{% block header %} Your Bullet Journal {% endblock %}
{% block content %}
<h1>
Hello, {{ name }}! Today is going to be a great day!
</h1>
{% endblock %}
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