Commit 0593a758 authored by Hänzelmann, Antje's avatar Hänzelmann, Antje
Browse files

login register

parent 1721df9b
......@@ -4,5 +4,4 @@
{% block content %}
{% endblock %}
\ No newline at end of file
......@@ -42,10 +42,13 @@
</ul>
</div>
<!-- Navbar auf rechter Seite-->
<!-- Navbar auf rechter Seite/Log In und Register Seite-->
<div class="navbar-nav">
<a class="nav-item nav-link" href="#">Login</a>
<a class="nav-item nav-link" href="#">Register</a>
<a class="nav-item nav-link" href="todo/login">Login</a>
</div>
<div class="navbar-nav">
<a class="nav-item nav-link" href="todo/register">Register</a>
</div>
</nav>
......
......@@ -36,8 +36,10 @@
<b>Wirtschafts-ID: </b>
<br>
Verantwortlich für den Inhalt nach § 55 Abs. 2 RstV: <br>
<br>
Dorothee Küppers <br>
Antje Hänzelmann <br>
<br>
Musterstraße 5,<br>
21900 Hamburg <br>
</p>
......
{% extends 'todo/base.html' %}
{% load bootstrap4 %}
{% block content %}
{% endblock %}
\ No newline at end of file
{% extends 'todo/base.html' %}
{% load bootstrap4 %}
{% block content %}
{% endblock %}
\ No newline at end of file
......@@ -16,6 +16,7 @@ class Selection(models.Model):
return f'{self.name}, total time: {self.total_time.__str__()}'
class Todo(models.Model):
text = models.CharField(max_length=200)
complete = models.BooleanField(default=False)
......
......@@ -75,6 +75,32 @@ def get_selection_page(request):
'todos_selection': [],
}
return render(request, 'todo/selection_page.html', content)
# show to do Anfang
todos_with_recurrence = Todo.objects.filter(complete=False).exclude(recurrences__exact='')
todos_without_recurrence = Todo.objects.filter(complete=False).filter(recurrences__exact='')
todos_today = []
todos_soon = []
todos_late = []
for recur_todo in todos_with_recurrence:
next_occur = recur_todo.recurrences.after(
datetime.datetime.now() - datetime.timedelta(days=1),
inc=True,
)
if next_occur is None:
last_occur = recur_todo.recurrences.before(
datetime.datetime.now(),
inc=True,
)
todos_late.append((recur_todo, last_occur.date()))
else:
recur_todo = (recur_todo, next_occur.date())
if next_occur.date() == datetime.date.today():
todos_today.append(recur_todo)
else:
todos_soon.append(recur_todo)
# show to do - Ende
def sort_todos(todos_late, todos_someday, todos_soon, todos_today):
......@@ -144,3 +170,11 @@ def get_show_todo(request):
def get_archiv(request):
content = {'page_title': 'Archiv'}
return render(request, 'todo/archiv.html', content)
def get_login(request):
content = {'page_title': 'Log In'}
return render(request, 'todo/login.html', content)
def get_register(request):
content = {'page_title': 'Register'}
return render(request, 'todo/register.html', content)
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