diff --git a/web_dev/sas_web/sas_web/settings.py b/web_dev/sas_web/sas_web/settings.py index ec51371..5a801c0 100644 --- a/web_dev/sas_web/sas_web/settings.py +++ b/web_dev/sas_web/sas_web/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( + 'startpage', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -55,7 +56,7 @@ ROOT_URLCONF = 'sas_web.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -104,3 +105,6 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static") +] diff --git a/web_dev/sas_web/startpage/templates/startpage/index.html b/web_dev/sas_web/startpage/templates/startpage/index.html new file mode 100644 index 0000000..f1c3c12 --- /dev/null +++ b/web_dev/sas_web/startpage/templates/startpage/index.html @@ -0,0 +1,7 @@ +{% extends "public/base.html" %} + +{% block content %} +
Blabla!
+{% endblock %} diff --git a/web_dev/sas_web/startpage/views.py b/web_dev/sas_web/startpage/views.py index 17347e1..ef6778f 100644 --- a/web_dev/sas_web/startpage/views.py +++ b/web_dev/sas_web/startpage/views.py @@ -1,6 +1,6 @@ -from django.http import HttpResponse +from django.shortcuts import render # Create your views here. def index(request): - return HttpResponse("Hey!") + return render(request, 'startpage/index.html', {}) diff --git a/web_dev/apb_icon.png b/web_dev/sas_web/static/public/images/apb_icon.png similarity index 100% rename from web_dev/apb_icon.png rename to web_dev/sas_web/static/public/images/apb_icon.png diff --git a/web_dev/sas_web/templates/public/base.html b/web_dev/sas_web/templates/public/base.html new file mode 100644 index 0000000..08f5b5d --- /dev/null +++ b/web_dev/sas_web/templates/public/base.html @@ -0,0 +1,8 @@ +{% load static %} + +Impressum: N.H (der ist für alles hier verantwortlich)