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

PY-2020.1.2 <ahaen@Anni Merge branch 'master'

parents 415cbee3 e3cd6c2d
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="Django default" uuid="00a86977-f609-4ca8-b3ec-8f6595a9956c">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<remarks>$PROJECT_DIR$/oos_2020_todo/settings.py</remarks>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:C:\Users\ahaen\PycharmProjects\oos_2020_todo\db.sqlite3</jdbc-url>
</data-source>
</component>
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (oos_2020_todo)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/oos_2020_todo.iml" filepath="$PROJECT_DIR$/.idea/oos_2020_todo.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="oos_2020_todo/settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (oos_2020_todo)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/templates" />
</list>
</option>
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
No preview for this file type
......@@ -38,7 +38,8 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'todo',
'bootstrap4'
'bootstrap4',
'recurrence',
]
MIDDLEWARE = [
......@@ -106,9 +107,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'de-de'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Berlin'
USE_I18N = True
......@@ -116,8 +117,11 @@ USE_L10N = True
USE_TZ = True
RECURRENCE_USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
......@@ -13,12 +13,28 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path
from django.views.i18n import JavaScriptCatalog
from todo.views import get_landing_page
from todo.views import get_landing_page, get_selection_page, add_todo, get_impressum, get_show_todo
urlpatterns = [
path('admin/', admin.site.urls),
path('start/', get_landing_page, name='landing_page')
path('start/', get_landing_page, name='landing_page'),
path('', get_landing_page, name='landing_page'),
path('selection/', get_selection_page, name='selection_page'),
path('todo/add/', add_todo, name='add_todo'),
path('impressum/', get_impressum, name='impressum'),
path('show_todo/', get_show_todo, name='show_todo'),
]
# according to https://django-recurrence.readthedocs.io/en/latest/installation.html
js_info_dict = {
'packages': ('recurrence', ),
}
urlpatterns += [
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), js_info_dict),
]
......@@ -31,3 +31,5 @@ sphinxcontrib-serializinghtml==1.1.4
sqlparse==0.3.1
urllib3==1.25.9
zipp==3.1.0
django-recurrence~=1.10.3
\ No newline at end of file
/*.todo-box {*/
/* background: lightgrey;*/
/*}*/
div.form-control.recurrence-widget{
height: max-content;
margin-bottom: 16px;
}
\ No newline at end of file
{% extends 'todo/base.html' %}
{% load bootstrap4 %}
{% block content %}
<form method="POST" class="post-form">
{% csrf_token %}
{{ form.media }}
{% bootstrap_form form %}
<button class="btn btn-primary" type="submit">Speichern</button>
</form>
{% endblock %}
\ No newline at end of file
{% load bootstrap4 %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
......@@ -7,8 +8,19 @@
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
<link rel="stylesheet" href="{% static 'css/main.css' %}">
<script type='text/javascript' src={% static 'js/selectionpage.js' %}></script>
</head>
<body>
{# fix for https://github.com/django-recurrence/django-recurrence/issues/47 #}
{# no i18n #}
<script>
if (!pgettext) {
function pgettext(ignore, t) {
return gettext(t);
}
}
</script>
{% block header %}
{#Navigation#}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
......@@ -20,7 +32,7 @@
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">neues Todo <span class="sr-only">(current)</span></a>
<a class="nav-link" href="/todo/add">neues Todo <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">alle Todos</a>
......@@ -28,8 +40,15 @@
<li class="nav-item">
<a class="nav-link" href="#">alte Todos</a>
</li>
</ul>
</div>
<!-- Navbar auf rechter Seite-->
<div class="navbar-nav">
<a class="nav-item nav-link" href="#">Login</a>
<a class="nav-item nav-link" href="#">Register</a>
</div>
</nav>
{% endblock %}
......@@ -41,10 +60,13 @@
{% block content %}
Dummy aus basis-Template
{% endblock %}
<br>
<br>
<br>
</div>
{% block footer %}
<nav class="navbar fixed-bottom navbar-light bg-light">
<a class="navbar-brand" href="#">Impressum</a>
<a class="navbar-brand" href="/impressum">Impressum</a>
</nav>
{% endblock %}
</body>
......
{% extends 'todo/base.html' %}
{% load bootstrap4 %}
{% block content %}
<br>
<p>
<b>Angaben gemäß § 5 TMG </b>
<br>
<br>
Dorothee Küppers <br>
Antje Haenzelmann <br>
<br>
Musterstraße 5,<br>
21900 Hamburg <br>
<br>
<b> Vertreten durch: </b>
<br>
Dorothee Küppers <br>
Antje Hänzelmann <br>
<br>
<b>Kontakt: </b>
<br>
Telefon: 040 - 123456 <br>
Email: Muster@Muster.de<br>
<br>
<b>Umsatzsteuer-ID:</b>
<br>
Umsatzsteuer-Identifikationsnummer gemäß § 27a Umsazusteuergesetz: 12345678 <br>
<br>
<b>Wirtschafts-ID: </b>
<br>
Verantwortlich für den Inhalt nach § 55 Abs. 2 RstV: <br>
Dorothee Küppers <br>
Antje Hänzelmann <br>
Musterstraße 5,<br>
21900 Hamburg <br>
</p>
{% endblock %}
\ No newline at end of file
......@@ -2,10 +2,10 @@
{% block content %}
<div class="row justify-content-center m-2">
<a class="btn btn-primary btn-lg" href="#">LOSLEGEN</a>
<a class="btn btn-primary btn-lg" href="/selection">LOSLEGEN</a>
</div>
<div class="row justify-content-center m-2">
<a class="btn btn-primary btn-lg" href="#">TO DO ANLEGEN</a>
<a class="btn btn-primary btn-lg" href="/todo/add/">TO DO ANLEGEN</a>
</div>
<div class="row justify-content-center m-2">
<a class="btn btn-primary btn-lg" href="#">TO DOS ANZEIGEN</a>
......
{% extends 'todo/base.html' %}
{% load static %}
{% load bootstrap4 %}
{% block content %}
<script src='../../todo/static/js/selectionpage.js'></script>
<div class="row">
<form action="" enctype="multipart/form-data" method="POST">
{% csrf_token %}
<div class="col-sm todo-box">
<div class="row justify-content-center">
<h3>Wie viel Zeit hast du?</h3>
</div>
<div class="row justify-content-center">
{% bootstrap_form form %}
</div>
<div class="row justify-content-center">
<input type="submit" class="btn btn-danger" value="submit">
</div>
</div>
</form>
<div class="col-sm" id="todo-choices">
<div class="row justify-content-center">
<div id="accordion">
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne"
aria-expanded="true" aria-controls="collapseOne">
Dinge, die eigentlich schon getan sein sollten
</button>
</h5>
</div>
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne"
data-parent="#accordion">
<div class="card-body">
<div class="list-group list group-flush">
{% for todo in todos_late %}
<li class="list-group-item">{{ todo.0.text }}, {{ todo.1 }}</li>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseTwo"
aria-expanded="false" aria-controls="collapseTwo">
Dinge, die heute zu erledigen sind
</button>
</h5>
</div>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
<div class="card-body">
<ul class="list-group list group-flush">
{% for todo in todos_today %}
<button type="button" class="list-group-item list-group-item-action">
{{ todo.0.text }}, {{ todo.1 }}
</button>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse"
data-target="#collapseThree" aria-expanded="false"
aria-controls="collapseThree">
Dinge, die bald zu erledigen sind
</button>
</h5>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree"
data-parent="#accordion">
<div class="card-body">
<ul class="list-group list group-flush">
{% for todo in todos_soon %}
<li class="list-group-item">{{ todo.0.text }}, {{ todo.1 }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingFour">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse"
data-target="#collapseFour" aria-expanded="false"
aria-controls="collapseFour">
Dinge, die keinen Zeitdruck haben
</button>
</h5>
</div>
<div id="collapseFour" class="collapse" aria-labelledby="headingFour"
data-parent="#accordion">
<div class="card-body">
<ul class="list-group list group-flush">
{% for todo in todos_someday %}
<li class="list-group-item">{{ todo.text }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% extends 'todo/base.html' %}
{% load bootstrap4 %}
{% block content %}
{% endblock %}
\ No newline at end of file
from django.contrib import admin
from todo.models import *
# Register your models here.
admin.site.register(Todo)
admin.site.register(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