Commit 94437e7f authored by James Esguerra's avatar James Esguerra

Added ItemsToday form and "Add Item" button

parent 39d0a51f
from django import forms
from .models import Key, ItemsThisWeek
from .models import Key, ItemsThisWeek, ItemsToday
class HomeForm(forms.Form):
......@@ -16,3 +16,9 @@ class ItemsThisWeekForm(forms.ModelForm):
class Meta:
model = ItemsThisWeek
fields = '__all__'
class ItemsTodayForm(forms.ModelForm):
class Meta:
model = ItemsToday
fields = '__all__'
......@@ -4,7 +4,7 @@ from django.db import models
class User(models.Model):
nickname = models.CharField(max_length=50)
bio = models.TextField(max_length=100)
profile = models.ImageField()
profile_photo = models.ImageField()
def __str__(self):
return self.nickname
......
......@@ -77,5 +77,4 @@ def ShowDeleteItemTW(request, pk):
def ShowToday(request):
my_date = datetime.datetime.now()
return render(request, 'today.html', {'my_date': my_date})
return render(request, 'today.html')
......@@ -7,12 +7,12 @@
{% block content %}
<h3>Key &nbsp Description</h3>
{% for key in key_list %}
<p> {{ key.key_name }} {{ key.key_description }} </p>
{% endfor %}
<a href='{% url 'add_key' %}'><button type='button'> Add Key </button></a>
<div id='key'>
<h3>Your Keys</h3>
<br>
{% for key in key_list %}
<p><b>{{ key.key_name }}:</b> {{ key.key_description }} </p>
{% endfor %}
<a href='{% url 'add_key' %}'><button type='button'> Add Key </button></a>
</div>
{% endblock %}
......@@ -14,7 +14,7 @@
<p>
<b>{{ item.key_type }}:</b> {{ item.details }}
<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>
{% endfor %}
<a href='{% url 'add_itemTW' %}'><button type='button'> Add Item </button></a>
......
......@@ -8,14 +8,9 @@
{% block content %}
<div id='today'>
<h2>{{ my_date|date:"m.d.D" }}</h2>
<h2>04.14.WED</h2>
<br>
<p>• study THEO modules by Friday</p>
<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>
<button type='button'> Add Item </button>
</div>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment