Commit 8d07c5e2 authored by Dennis Appel's avatar Dennis Appel

Initial commit

parents
.vscode
db.sqlite3
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "*"
[dev-packages]
pylint = "*"
pylint-django = "*"
yapf = "*"
[requires]
python_version = "3.7"
{
"_meta": {
"hash": {
"sha256": "19002c39efd6372f8e4c1cc85d186431357b7c4fd3f0fecfd05eddb9bb456f47"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"django": {
"hashes": [
"sha256:1ffab268ada3d5684c05ba7ce776eaeedef360712358d6a6b340ae9f16486916",
"sha256:dd46d87af4c1bf54f4c926c3cfa41dc2b5c15782f15e4329752ce65f5dad1c37"
],
"index": "pypi",
"version": "==2.1.3"
},
"pytz": {
"hashes": [
"sha256:31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca",
"sha256:8e0f8568c118d3077b46be7d654cc8167fa916092e28320cde048e54bfc9f1e6"
],
"version": "==2018.7"
}
},
"develop": {
"astroid": {
"hashes": [
"sha256:292fa429e69d60e4161e7612cb7cc8fa3609e2e309f80c224d93a76d5e7b58be",
"sha256:c7013d119ec95eb626f7a2011f0b63d0c9a095df9ad06d8507b37084eada1a8d"
],
"version": "==2.0.4"
},
"isort": {
"hashes": [
"sha256:1153601da39a25b14ddc54955dbbacbb6b2d19135386699e2ad58517953b34af",
"sha256:b9c40e9750f3d77e6e4d441d8b0266cf555e7cdabdcff33c4fd06366ca761ef8",
"sha256:ec9ef8f4a9bc6f71eec99e1806bfa2de401650d996c59330782b89a5555c1497"
],
"version": "==4.3.4"
},
"lazy-object-proxy": {
"hashes": [
"sha256:0ce34342b419bd8f018e6666bfef729aec3edf62345a53b537a4dcc115746a33",
"sha256:1b668120716eb7ee21d8a38815e5eb3bb8211117d9a90b0f8e21722c0758cc39",
"sha256:209615b0fe4624d79e50220ce3310ca1a9445fd8e6d3572a896e7f9146bbf019",
"sha256:27bf62cb2b1a2068d443ff7097ee33393f8483b570b475db8ebf7e1cba64f088",
"sha256:27ea6fd1c02dcc78172a82fc37fcc0992a94e4cecf53cb6d73f11749825bd98b",
"sha256:2c1b21b44ac9beb0fc848d3993924147ba45c4ebc24be19825e57aabbe74a99e",
"sha256:2df72ab12046a3496a92476020a1a0abf78b2a7db9ff4dc2036b8dd980203ae6",
"sha256:320ffd3de9699d3892048baee45ebfbbf9388a7d65d832d7e580243ade426d2b",
"sha256:50e3b9a464d5d08cc5227413db0d1c4707b6172e4d4d915c1c70e4de0bbff1f5",
"sha256:5276db7ff62bb7b52f77f1f51ed58850e315154249aceb42e7f4c611f0f847ff",
"sha256:61a6cf00dcb1a7f0c773ed4acc509cb636af2d6337a08f362413c76b2b47a8dd",
"sha256:6ae6c4cb59f199d8827c5a07546b2ab7e85d262acaccaacd49b62f53f7c456f7",
"sha256:7661d401d60d8bf15bb5da39e4dd72f5d764c5aff5a86ef52a042506e3e970ff",
"sha256:7bd527f36a605c914efca5d3d014170b2cb184723e423d26b1fb2fd9108e264d",
"sha256:7cb54db3535c8686ea12e9535eb087d32421184eacc6939ef15ef50f83a5e7e2",
"sha256:7f3a2d740291f7f2c111d86a1c4851b70fb000a6c8883a59660d95ad57b9df35",
"sha256:81304b7d8e9c824d058087dcb89144842c8e0dea6d281c031f59f0acf66963d4",
"sha256:933947e8b4fbe617a51528b09851685138b49d511af0b6c0da2539115d6d4514",
"sha256:94223d7f060301b3a8c09c9b3bc3294b56b2188e7d8179c762a1cda72c979252",
"sha256:ab3ca49afcb47058393b0122428358d2fbe0408cf99f1b58b295cfeb4ed39109",
"sha256:bd6292f565ca46dee4e737ebcc20742e3b5be2b01556dafe169f6c65d088875f",
"sha256:cb924aa3e4a3fb644d0c463cad5bc2572649a6a3f68a7f8e4fbe44aaa6d77e4c",
"sha256:d0fc7a286feac9077ec52a927fc9fe8fe2fabab95426722be4c953c9a8bede92",
"sha256:ddc34786490a6e4ec0a855d401034cbd1242ef186c20d79d2166d6a4bd449577",
"sha256:e34b155e36fa9da7e1b7c738ed7767fc9491a62ec6af70fe9da4a057759edc2d",
"sha256:e5b9e8f6bda48460b7b143c3821b21b452cb3a835e6bbd5dd33aa0c8d3f5137d",
"sha256:e81ebf6c5ee9684be8f2c87563880f93eedd56dd2b6146d8a725b50b7e5adb0f",
"sha256:eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a",
"sha256:f460d1ceb0e4a5dcb2a652db0904224f367c9b3c1470d5a7683c0480e582468b"
],
"version": "==1.3.1"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"pylint": {
"hashes": [
"sha256:1d6d3622c94b4887115fe5204982eee66fdd8a951cf98635ee5caee6ec98c3ec",
"sha256:31142f764d2a7cd41df5196f9933b12b7ee55e73ef12204b648ad7e556c119fb"
],
"index": "pypi",
"version": "==2.1.1"
},
"pylint-django": {
"hashes": [
"sha256:5dc5f85caef2c5f9e61622b9cbd89d94edd3dcf546939b2974d18de4fa90d676",
"sha256:bf313f10b68ed915a34f0f475cc9ff8c7f574a95302beb48b79c5993f7efd84c"
],
"index": "pypi",
"version": "==2.0.2"
},
"pylint-plugin-utils": {
"hashes": [
"sha256:8ad25a82bcce390d1d6b7c006c123e0cb18051839c9df7b8bdb7823c53fe676e"
],
"version": "==0.4"
},
"six": {
"hashes": [
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
],
"version": "==1.11.0"
},
"wrapt": {
"hashes": [
"sha256:d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6"
],
"version": "==1.10.11"
},
"yapf": {
"hashes": [
"sha256:b96815bd0bbd2ab290f2ae9e610756940b17a0523ef2f6b2d31da749fc395137",
"sha256:cebb6faf35c9027c08996c07831b8971f3d67c0eb615269f66dfd7e6815fdc2a"
],
"index": "pypi",
"version": "==0.24.0"
}
}
}
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class AboutConfig(AppConfig):
name = 'about'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
app_name = 'about'
urlpatterns = [path('', views.index, name='index')]
from django.http import HttpResponse
def index(request):
return HttpResponse("About Index")
"""
Django settings for barrierefreieapp project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '2clt8!a!%yo26)6s&aw+8i%*2z740yi%$xeiwpz36inra&!c_k'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'checklist.apps.ChecklistConfig',
'wiki.apps.WikiConfig',
'glossary.apps.GlossaryConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'barrierefreieapp.urls'
TEMPLATES = [
{
'BACKEND':
'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
],
'APP_DIRS':
True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'barrierefreieapp.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'CET'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATIC_URL = '/static/'
"""barrierefreieapp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
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.contrib import admin
from django.urls import include, path
urlpatterns = [
path('welcome/', include('welcome.urls')),
path('about/', include('about.urls')),
path('wiki/', include('wiki.urls')),
path('glossary/', include('glossary.urls')),
path('checklist/', include('checklist.urls')),
path('admin/', admin.site.urls),
]
"""
WSGI config for barrierefreieapp project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'barrierefreieapp.settings')
application = get_wsgi_application()
from django.contrib import admin
from .models import CheckListEntry
admin.site.register(CheckListEntry)
from django.apps import AppConfig
class ChecklistConfig(AppConfig):
name = 'checklist'
# Generated by Django 2.1.3 on 2018-11-06 17:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('wiki', '0001_initial'),
('glossary', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ListEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('listEntryTitle', models.CharField(max_length=200)),
('listEntrySeverity', models.CharField(max_length=10)),
('listEntryDescription', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
]
# Generated by Django 2.1.3 on 2018-11-06 17:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wiki', '0002_auto_20181106_1852'),
('glossary', '0001_initial'),
('checklist', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CheckListEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('checkListEntryTitle', models.CharField(max_length=200)),
('checkListEntrySeverity', models.CharField(max_length=10)),
('checkListEntryDescription', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
migrations.RemoveField(
model_name='listentry',
name='glossaryEntry',
),
migrations.RemoveField(
model_name='listentry',
name='wikiEntry',
),
migrations.DeleteModel(
name='ListEntry',
),
]
from django.db import models
class CheckListEntry(models.Model):
wikiEntry = models.ForeignKey(
'wiki.WikiEntry', on_delete=models.SET_NULL, null=True)
glossaryEntry = models.ForeignKey(
'glossary.GlossaryEntry', on_delete=models.SET_NULL, null=True)
checkListEntryTitle = models.CharField(max_length=200)
checkListEntrySeverity = models.CharField(max_length=10)
checkListEntryDescription = models.TextField()
{% include "header.html" %}
{% if checklist_entries %}
<div id='checklist'>
<ul>
{% for entry in checklist_entries %}
<li>
<label>
<input type="checkbox">{{entry.checkListEntryTitle}} [{{entry.checkListEntrySeverity}}]
</label>
<a href ="{% url 'wiki:index' %}#item_{{entry.id}}">Wiki</a>
<a href ="{% url 'glossary:index'%}#item_{{entry.id}}">Glossary</a>
{{entry.checkListEntryDescription}}
</li>
{% endfor %}
</ul>
{% else %}
<p>Keine Eintraege gefunden</p>
</div>
{% endif %}
{% include "footer.html" %}
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
app_name = 'checklist'
urlpatterns = [path('', views.IndexView.as_view(), name='index')]
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from django.views import generic
from .models import CheckListEntry
class IndexView(generic.ListView):
template_name = 'checklist/index.html'
context_object_name = 'checklist_entries'
def get_queryset(self):
return CheckListEntry.objects.all()
from django.contrib import admin
from .models import GlossaryEntry
admin.site.register(GlossaryEntry)
from django.apps import AppConfig
class GlossaryConfig(AppConfig):
name = 'glossary'
# Generated by Django 2.1.3 on 2018-11-06 17:41
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='GlossaryEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('glossaryTitle', models.CharField(max_length=200)),
('glossaryDefinition', models.TextField()),
],
),
]
from django.db import models
class GlossaryEntry(models.Model):
glossaryTitle = models.CharField(max_length=200)
glossaryDefinition = models.TextField()
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
app_name = 'glossary'
urlpatterns = [
path('', views.index, name='index'),
]
from django.http import HttpResponse
def index(request):
return HttpResponse('Glossary index')
#!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'barrierefreieapp.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class WelcomeConfig(AppConfig):
name = 'welcome'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
app_name = 'welcome'
urlpatterns = [path('', views.index, name='index')]
from django.http import HttpResponse
def index(request):
return HttpResponse('Welcome index')
from django.contrib import admin
from .models import WikiEntry, WikiExample
admin.site.register(WikiEntry)
admin.site.register(WikiExample)
from django.apps import AppConfig
class WikiConfig(AppConfig):
name = 'wiki'
# Generated by Django 2.1.3 on 2018-11-06 17:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('glossary', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Example',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('exampleTitle', models.CharField(max_length=200)),
('exampleText', models.TextField()),
('exampleResource', models.FileField(upload_to='')),
],
),
migrations.CreateModel(
name='WikiEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('wikiTitle', models.CharField(max_length=200)),
('wikiText', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
],
),
migrations.AddField(
model_name='example',
name='wikiEntry',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry'),
),
]