use templating
This commit is contained in:
@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
|
|||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
'startpage',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
@@ -55,7 +56,7 @@ ROOT_URLCONF = 'sas_web.urls'
|
|||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [],
|
'DIRS': [os.path.join(BASE_DIR, 'templates')],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
@@ -104,3 +105,6 @@ USE_TZ = True
|
|||||||
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
STATICFILES_DIRS = [
|
||||||
|
os.path.join(BASE_DIR, "static")
|
||||||
|
]
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{% extends "public/base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h2>Hi</h2>
|
||||||
|
|
||||||
|
<p>Blabla!</p>
|
||||||
|
{% endblock %}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.http import HttpResponse
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
def index(request):
|
def index(request):
|
||||||
return HttpResponse("Hey!")
|
return render(request, 'startpage/index.html', {})
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,8 @@
|
|||||||
|
{% load static %}
|
||||||
|
|
||||||
|
<img src="{% static "public/images/apb_icon.png" %}" />
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<p>Impressum: N.H (der ist für alles hier verantwortlich)</p>
|
||||||
Reference in New Issue
Block a user