Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Bullet Journal
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
Franz Leonard Atanacio
Bullet Journal
Commits
d95f5f5a
Commit
d95f5f5a
authored
Apr 05, 2021
by
nikkastra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atanacio_lab1 final
parent
58e6977f
Pipeline
#1778
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
views.cpython-38.pyc
mysite/bulletjournal/__pycache__/views.cpython-38.pyc
+0
-0
views.py
mysite/bulletjournal/views.py
+8
-5
No files found.
mysite/bulletjournal/__pycache__/views.cpython-38.pyc
View file @
d95f5f5a
No preview for this file type
mysite/bulletjournal/views.py
View file @
d95f5f5a
...
@@ -4,19 +4,22 @@ from django.views import View
...
@@ -4,19 +4,22 @@ from django.views import View
from
.forms
import
*
from
.forms
import
*
name_dict
=
{}
class
HomePageView
(
View
):
class
HomePageView
(
View
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
form
=
IndexCardForm
()
form
=
IndexCardForm
()
return
render
(
request
,
'base.html'
,
{
'form'
:
form
})
return
render
(
request
,
'base.html'
,
{
'form'
:
form
})
def
index_card_view
(
request
):
def
index_card_view
(
request
):
if
request
.
method
==
'POST'
:
global
name_dict
if
len
(
name_dict
)
==
1
:
return
render
(
request
,
'base.html'
,
name_dict
)
elif
request
.
method
==
'POST'
:
form
=
IndexCardForm
(
request
.
POST
)
form
=
IndexCardForm
(
request
.
POST
)
if
form
.
is_valid
():
if
form
.
is_valid
():
return
render
(
request
,
'base.html'
,
{
name_dict
[
'name'
]
=
form
.
cleaned_data
[
'name'
]
'name'
:
form
.
cleaned_data
[
'name'
]
return
render
(
request
,
'base.html'
,
name_dict
)
}
)
else
:
else
:
form
=
IndexCardForm
()
form
=
IndexCardForm
()
return
render
(
request
,
'base.html'
,
{
'form'
:
form
})
return
render
(
request
,
'base.html'
,
{
'form'
:
form
})
...
...
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