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
94437e7f
Commit
94437e7f
authored
Apr 07, 2021
by
James Esguerra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ItemsToday form and "Add Item" button
parent
39d0a51f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
20 deletions
+20
-20
forms.cpython-38.pyc
pages/__pycache__/forms.cpython-38.pyc
+0
-0
models.cpython-38.pyc
pages/__pycache__/models.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
pages/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
pages/__pycache__/views.cpython-38.pyc
+0
-0
forms.py
pages/forms.py
+7
-1
models.py
pages/models.py
+1
-1
views.py
pages/views.py
+1
-2
key.html
templates/key.html
+8
-8
this_week.html
templates/this_week.html
+1
-1
today.html
templates/today.html
+2
-7
No files found.
pages/__pycache__/forms.cpython-38.pyc
View file @
94437e7f
No preview for this file type
pages/__pycache__/models.cpython-38.pyc
View file @
94437e7f
No preview for this file type
pages/__pycache__/urls.cpython-38.pyc
View file @
94437e7f
No preview for this file type
pages/__pycache__/views.cpython-38.pyc
View file @
94437e7f
No preview for this file type
pages/forms.py
View file @
94437e7f
from
django
import
forms
from
django
import
forms
from
.models
import
Key
,
ItemsThisWeek
from
.models
import
Key
,
ItemsThisWeek
,
ItemsToday
class
HomeForm
(
forms
.
Form
):
class
HomeForm
(
forms
.
Form
):
...
@@ -16,3 +16,9 @@ class ItemsThisWeekForm(forms.ModelForm):
...
@@ -16,3 +16,9 @@ class ItemsThisWeekForm(forms.ModelForm):
class
Meta
:
class
Meta
:
model
=
ItemsThisWeek
model
=
ItemsThisWeek
fields
=
'__all__'
fields
=
'__all__'
class
ItemsTodayForm
(
forms
.
ModelForm
):
class
Meta
:
model
=
ItemsToday
fields
=
'__all__'
pages/models.py
View file @
94437e7f
...
@@ -4,7 +4,7 @@ from django.db import models
...
@@ -4,7 +4,7 @@ from django.db import models
class
User
(
models
.
Model
):
class
User
(
models
.
Model
):
nickname
=
models
.
CharField
(
max_length
=
50
)
nickname
=
models
.
CharField
(
max_length
=
50
)
bio
=
models
.
TextField
(
max_length
=
100
)
bio
=
models
.
TextField
(
max_length
=
100
)
profile
=
models
.
ImageField
()
profile
_photo
=
models
.
ImageField
()
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
nickname
return
self
.
nickname
...
...
pages/views.py
View file @
94437e7f
...
@@ -77,5 +77,4 @@ def ShowDeleteItemTW(request, pk):
...
@@ -77,5 +77,4 @@ def ShowDeleteItemTW(request, pk):
def
ShowToday
(
request
):
def
ShowToday
(
request
):
my_date
=
datetime
.
datetime
.
now
()
return
render
(
request
,
'today.html'
)
return
render
(
request
,
'today.html'
,
{
'my_date'
:
my_date
})
templates/key.html
View file @
94437e7f
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
{% block content %}
{% block content %}
<
h3>
Key
&
nbsp Description
</h3
>
<
div
id=
'key'
>
<h3>
Your Keys
</h3>
{% for key in key_list %}
<br>
<p>
{{ key.key_name }} {{ key.key_description }}
</p>
{% for key in key_list %}
{% endfor %}
<p><b>
{{ key.key_name }}:
</b>
{{ key.key_description }}
</p>
{% endfor %}
<a
href=
'{% url '
add_key
'
%}'
><button
type=
'button'
>
Add Key
</button></a>
<a
href=
'{% url '
add_key
'
%}'
><button
type=
'button'
>
Add Key
</button></a>
</div>
{% endblock %}
{% endblock %}
templates/this_week.html
View file @
94437e7f
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<p>
<p>
<b>
{{ item.key_type }}:
</b>
{{ item.details }}
<b>
{{ item.key_type }}:
</b>
{{ item.details }}
<a
href=
'{% url '
edit_itemTW
'
item
.
pk
%}'
><button
type=
'button'
>
Edit
</button></a>
<a
href=
'{% url '
edit_itemTW
'
item
.
pk
%}'
><button
type=
'button'
>
Edit
</button></a>
<a
href=
'{% url '
delete_itemTW
'
item
.
pk
%}'
><button
type=
'button'
>
X
</button></a>
<a
href=
'{% url '
delete_itemTW
'
item
.
pk
%}'
><button
type=
'button'
>
Delete
</button></a>
</p>
</p>
{% endfor %}
{% endfor %}
<a
href=
'{% url '
add_itemTW
'
%}'
><button
type=
'button'
>
Add Item
</button></a>
<a
href=
'{% url '
add_itemTW
'
%}'
><button
type=
'button'
>
Add Item
</button></a>
...
...
templates/today.html
View file @
94437e7f
...
@@ -8,14 +8,9 @@
...
@@ -8,14 +8,9 @@
{% block content %}
{% block content %}
<div
id=
'today'
>
<div
id=
'today'
>
<h2>
{{ my_date|date:"m.d.D" }}
</h2>
<h2>
04.14.WED
</h2>
<br>
<br>
<p>
• study THEO modules by Friday
</p>
<button
type=
'button'
>
Add Item
</button>
<p>
• print Globe and Cignal bills
</p>
<p>
- i need more to buy more fish food
</p>
<p>
- be careful when deleting commits on git!
</p>
<p>
○ 7PM IG store collection release
</p>
<p>
○ 9PM meeting with HISTO group mates
</p>
</div>
</div>
{% endblock %}
{% 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