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

Added ItemsToday form and "Add Item" button

parent 39d0a51f
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__'
...@@ -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
......
...@@ -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})
...@@ -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 %}
...@@ -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>
......
...@@ -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 %}
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