Skip to content

Commit

Permalink
finished base template
Browse files Browse the repository at this point in the history
  • Loading branch information
Clemens-Dautermann committed Nov 16, 2021
1 parent c7209fb commit 09c2cc5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 72 deletions.
65 changes: 0 additions & 65 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -242,68 +242,3 @@ modules.xml
# Sonarlint plugin
.idea/sonarlint

### Python ###
# Byte-compiled / optimized / DLL files

# C extensions

# Distribution / packaging

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.

# Installer logs

# Unit test / coverage reports

# Translations

# Django stuff:

# Flask stuff:

# Scrapy stuff:

# Sphinx documentation

# PyBuilder

# Jupyter Notebook

# IPython

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.

# PEP 582; used by e.g. github.com/David-OConnor/pyflow

# Celery stuff

# SageMath parsed files

# Environments

# Spyder project settings

# Rope project settings

# mkdocs documentation

# mypy

# Pyre type checker

# pytype static type analyzer

# Cython debug symbols

# End of https://www.toptal.com/developers/gitignore/api/django,python,pycharm+all
2 changes: 2 additions & 0 deletions .idea/todolist.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion todolist_server/task_display/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import path
from task_display.views import list_tasks_as_list
from task_display.views import list_tasks_as_list, redirect_to_list_view

urlpatterns = [
path('tasks/list/', list_tasks_as_list),
path('tasks/', redirect_to_list_view),
]
12 changes: 10 additions & 2 deletions todolist_server/task_display/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from django.shortcuts import render
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required


# Create your views here.
@login_required
def list_tasks_as_list(request):
context = {'title': 'Tasklist'}
context = {'title': 'Tasklist',
'fullname': request.user.first_name + request.user.last_name,
'email': request.user.email}
return render(request, 'task_display/task_list.html', context)


def redirect_to_list_view(request):
return redirect('list/')
16 changes: 13 additions & 3 deletions todolist_server/todolist_server/templates/base/menubar.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@
</nav>

<ul id="slide-out" class="sidenav sidenav-fixed">
<li><a href="#!" class="waves-effect"><i class="material-icons">list_alt</i>Task list</a></li>
<li><a href="#!" class="waves-effect"><i class="material-icons">grid_view</i>Matrix view</a></li>
<li><a href="#!" class="waves-effect"><i class="material-icons">add</i>New task</a></li>
<li>
<div class="user-view">
<a href="#user"><img class="circle" src=""></a>
<a href="#name"><span class="white-text name">{{ fullname }}</span></a>
<a href="#email"><span class="white-text email">{{ email }}</span></a>
</div>
</li>
<li>
<div class="divider"></div>
</li>
<li><a href="#" class="waves-effect"><i class="material-icons">list_alt</i>Task list</a></li>
<li><a href="#" class="waves-effect"><i class="material-icons">grid_view</i>Matrix view</a></li>
<li><a href="#" class="waves-effect"><i class="material-icons">add</i>New task</a></li>
<li>
<div class="divider"></div>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base/menubar.html" %}
{% block title %}
foo

{% endblock %}

0 comments on commit 09c2cc5

Please sign in to comment.