More complex

This commit is contained in:
Arnold Dechamps 2024-02-23 18:31:25 +01:00
parent 8ca9715ebd
commit 5251ec2639
No known key found for this signature in database
GPG key ID: AE66543374E41C89
4 changed files with 18 additions and 2 deletions

View file

@ -39,6 +39,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'admin_extra_buttons', 'admin_extra_buttons',
'tldtester.apps.TldtesterConfig', 'tldtester.apps.TldtesterConfig',
'tldtest',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@ -56,7 +57,7 @@ ROOT_URLCONF = 'tldtest.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
"DIRS": [], "DIRS": [BASE_DIR / "templates"],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [

View file

@ -0,0 +1,12 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}TLD Tester{% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock content %}
</body>
</html>

View file

@ -1,3 +1,4 @@
{% extends "base.html" %}
{% block content %} {% block content %}
Hello World Hello World
{% endblock content %} {% endblock content %}

View file

@ -3,8 +3,10 @@ from django.views.generic import TemplateView
class Index(TemplateView): class Index(TemplateView):
template_name = 'index.html' template_name = 'home.html'
def home(request):
return render(request, 'home.html')
""" """
def handler404(request): def handler404(request):