Commit a01ed1fa authored by dorothee.kueppers's avatar dorothee.kueppers
Browse files

django-recurrence noch hübscher

parent b5033940
No preview for this file type
......@@ -59,6 +59,9 @@
{% block content %}
Dummy aus basis-Template
{% endblock %}
<br>
<br>
<br>
</div>
{% block footer %}
<nav class="navbar fixed-bottom navbar-light bg-light">
......
......@@ -9,15 +9,10 @@ class TodoForm(forms.ModelForm):
model = Todo
exclude = ['created', 'complete', 'rank']
widgets = {
'due_date': forms.DateInput(format='%m/%d/%Y',
attrs={'class': 'form-control',
'placeholder': 'TT.MM.JJJJ',
'type': 'date'}),
'text': forms.TextInput(attrs={'placeholder': 'Küche putzen, Python lernen, Haare waschen...'}),
# 'recurrences': RecurrenceField()
}
labels = {'due_date': 'fällig am',
'text': 'Was ist zu tun? *',
labels = {'text': 'Was ist zu tun? *',
'duration': 'Was meinst du, wie lange die Aufgabe dauert? (in Minuten) *',
'recurrences': 'Wiederholungen'}
......
# Generated by Django 3.0.7 on 2020-07-02 20:24
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('todo', '0006_auto_20200702_1822'),
]
operations = [
migrations.RemoveField(
model_name='todo',
name='due_date',
),
]
......@@ -9,7 +9,6 @@ class Todo(models.Model):
text = models.CharField(max_length=200)
complete = models.BooleanField(default=False)
duration = models.IntegerField(default=15)
due_date = models.DateTimeField(null=True)
created = models.DateField(default=datetime.date.today)
rank = models.IntegerField(default=1)
recurrences = RecurrenceField(null=True)
......
......@@ -27,7 +27,8 @@ def add_todo(request):
else:
form = TodoForm()
return render(request, 'todo/add_todo.html', {'page_title': 'Lege eine neue Aufgabe an! ',
'form': form})
'form': form})
def get_selection_page(request):
selection = Selection()
......
Supports Markdown
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