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
6ba6c7fd
Commit
6ba6c7fd
authored
Apr 09, 2021
by
nikkastra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
key done but no dialog box
parent
d983635d
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
9 deletions
+75
-9
forms.cpython-38.pyc
mysite/bulletjournal/__pycache__/forms.cpython-38.pyc
+0
-0
models.cpython-38.pyc
mysite/bulletjournal/__pycache__/models.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
mysite/bulletjournal/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
mysite/bulletjournal/__pycache__/views.cpython-38.pyc
+0
-0
forms.py
mysite/bulletjournal/forms.py
+7
-1
0004_auto_20210409_2002.py
mysite/bulletjournal/migrations/0004_auto_20210409_2002.py
+26
-0
0004_auto_20210409_2002.cpython-38.pyc
...ations/__pycache__/0004_auto_20210409_2002.cpython-38.pyc
+0
-0
models.py
mysite/bulletjournal/models.py
+8
-0
views.py
mysite/bulletjournal/views.py
+16
-1
index.html
mysite/mysite/templates/index.html
+1
-1
key.html
mysite/mysite/templates/key.html
+16
-5
profile.html
mysite/mysite/templates/profile.html
+1
-1
No files found.
mysite/bulletjournal/__pycache__/forms.cpython-38.pyc
View file @
6ba6c7fd
No preview for this file type
mysite/bulletjournal/__pycache__/models.cpython-38.pyc
View file @
6ba6c7fd
No preview for this file type
mysite/bulletjournal/__pycache__/urls.cpython-38.pyc
View file @
6ba6c7fd
No preview for this file type
mysite/bulletjournal/__pycache__/views.cpython-38.pyc
View file @
6ba6c7fd
No preview for this file type
mysite/bulletjournal/forms.py
View file @
6ba6c7fd
...
@@ -17,3 +17,9 @@ class Picture(forms.ModelForm):
...
@@ -17,3 +17,9 @@ class Picture(forms.ModelForm):
class
Meta
:
class
Meta
:
model
=
Name
model
=
Name
fields
=
[
'image'
]
fields
=
[
'image'
]
class
Keys
(
forms
.
ModelForm
):
class
Meta
:
model
=
Key
fields
=
[
'key'
,
'description'
]
\ No newline at end of file
mysite/bulletjournal/migrations/0004_auto_20210409_2002.py
0 → 100644
View file @
6ba6c7fd
# Generated by Django 3.1.7 on 2021-04-09 12:02
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'bulletjournal'
,
'0003_auto_20210408_0629'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Key'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'key'
,
models
.
CharField
(
max_length
=
50
)),
(
'description'
,
models
.
CharField
(
max_length
=
100
)),
],
),
migrations
.
AlterField
(
model_name
=
'name'
,
name
=
'name'
,
field
=
models
.
CharField
(
default
=
'test'
,
max_length
=
100
,
unique
=
True
),
),
]
mysite/bulletjournal/migrations/__pycache__/0004_auto_20210409_2002.cpython-38.pyc
0 → 100644
View file @
6ba6c7fd
File added
mysite/bulletjournal/models.py
View file @
6ba6c7fd
...
@@ -18,6 +18,14 @@ class Name(models.Model):
...
@@ -18,6 +18,14 @@ class Name(models.Model):
return
self
.
units
==
1
return
self
.
units
==
1
class
Key
(
models
.
Model
):
key
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
CharField
(
max_length
=
100
)
def
__str__
(
self
):
return
'{} - {}'
.
format
(
self
.
key
,
self
.
description
)
class
Tasks
(
models
.
Model
):
class
Tasks
(
models
.
Model
):
name
=
models
.
ForeignKey
(
Name
,
on_delete
=
models
.
CASCADE
)
name
=
models
.
ForeignKey
(
Name
,
on_delete
=
models
.
CASCADE
)
key
=
models
.
CharField
(
max_length
=
2
)
key
=
models
.
CharField
(
max_length
=
2
)
...
...
mysite/bulletjournal/views.py
View file @
6ba6c7fd
...
@@ -88,7 +88,22 @@ def profile(request):
...
@@ -88,7 +88,22 @@ def profile(request):
def
key
(
request
):
def
key
(
request
):
return
render
(
request
,
'key.html'
)
key_dict
=
{}
if
request
.
method
==
'POST'
:
form
=
Keys
(
request
.
POST
)
if
form
.
is_valid
():
new_key
=
Key
(
key
=
form
.
cleaned_data
[
'key'
],
description
=
form
.
cleaned_data
[
'description'
])
new_key
.
save
()
key_dict
=
{
'form'
:
form
}
the_keys
=
[
str
(
x
)
for
x
in
Key
.
objects
.
all
()]
key_dict
[
'the_keys'
]
=
the_keys
return
render
(
request
,
'key.html'
,
key_dict
)
else
:
form
=
Keys
()
key_dict
=
{
'form'
:
form
}
the_keys
=
[
str
(
x
)
for
x
in
Key
.
objects
.
all
()]
key_dict
[
'the_keys'
]
=
the_keys
return
render
(
request
,
'key.html'
,
key_dict
)
def
thisweek
(
request
):
def
thisweek
(
request
):
...
...
mysite/mysite/templates/index.html
View file @
6ba6c7fd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
{% if name %}
{% if name %}
<p>
Hello, {{name}}! Today is gonna be a great day!
</p>
<p>
Hello, {{name}}! Today is gonna be a great day!
</p>
{% else %}
{% else %}
<form
action=
"
/home
"
method=
"post"
>
<form
action=
"
{% url 'home'%}
"
method=
"post"
>
{% csrf_token %}
{% csrf_token %}
{{form}}
{{form}}
<input
type=
"Submit"
value=
"Submit"
>
<input
type=
"Submit"
value=
"Submit"
>
...
...
mysite/mysite/templates/key.html
View file @
6ba6c7fd
...
@@ -8,9 +8,20 @@
...
@@ -8,9 +8,20 @@
{% block content %}
{% block content %}
<h1>
Key
</h1>
<h1>
Key
</h1>
<p>
● Tasks: things you have to do
</p>
<ul>
<p>
- Notes: things you don't want to forget
</p>
{% if the_keys %}
<p>
◦ Events: noteworth moments in time
</p>
{% for x in the_keys %}
<p>
● Task incomplete
</p>
<li>
<p>
x Task complete
</p>
{{x}}
</li>
{% endfor %}
{% else %}
<p>
No keys.
</p>
{% endif %}
</ul>
<form
action=
"{% url 'key'%}"
method=
"post"
>
{% csrf_token %}
{{form}}
<input
type=
"Submit"
value=
"Add"
>
</form>
{% endblock %}
{% endblock %}
\ No newline at end of file
mysite/mysite/templates/profile.html
View file @
6ba6c7fd
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<li>
{{name}}
</li>
<li>
{{name}}
</li>
<li>
<li>
{{nickname}}
{{nickname}}
<form
action=
"
/profile
"
method=
"POST"
id=
'nickname'
>
<form
action=
"
{% url 'profile' %}
"
method=
"POST"
id=
'nickname'
>
{% csrf_token %}
{% csrf_token %}
{{ form2 }}
{{ form2 }}
<input
type=
'Submit'
value=
'Edit'
id=
'nickname'
>
<input
type=
'Submit'
value=
'Edit'
id=
'nickname'
>
...
...
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