diff --git a/home/templates/home.html b/home/templates/home.html new file mode 100644 index 0000000000000000000000000000000000000000..130f07627a6fae544bd0137de6b00a1b0246d506 --- /dev/null +++ b/home/templates/home.html @@ -0,0 +1,15 @@ +{% load static %} +<!doctype html> +<html lang=fr> + <head> + <title>Site title</title> + <meta charset="utf-8"> + + <link rel="stylesheet" href="{% static 'css/style.css' %}"> + </head> + <body> + <h1>A Title</h1> + <p>a paragraph</p> + <p>another paragraph</p> + </body> +</html> \ No newline at end of file diff --git a/home/urls.py b/home/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..355175e0cb0b91c2dcd9b20317443b9d31978138 --- /dev/null +++ b/home/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name = 'home'), +] \ No newline at end of file diff --git a/home/views.py b/home/views.py index 91ea44a218fbd2f408430959283f0419c921093e..795eb43531e5ea5f030c29d552d90fe3d67b70a4 100644 --- a/home/views.py +++ b/home/views.py @@ -1,3 +1,4 @@ from django.shortcuts import render -# Create your views here. +def home(request): + return render(request, 'home.html', {}) \ No newline at end of file diff --git a/interludes/templates/home.html b/interludes/templates/home.html deleted file mode 100644 index bdccf686ac6c226dd09a39289aa3bfd3b063374d..0000000000000000000000000000000000000000 --- a/interludes/templates/home.html +++ /dev/null @@ -1,9 +0,0 @@ -<html> - <head> - <title>Site title</title> - </head> - <body> - <p>a paragraph</p> - <p>another paragraph</p> - </body> -</html> \ No newline at end of file diff --git a/interludes/urls.py b/interludes/urls.py index cdd60518a38762943b1acc0da0a7f90d3cadd9d6..0a9aeb4dcc5697d1db2ac3d746805bc32990b276 100644 --- a/interludes/urls.py +++ b/interludes/urls.py @@ -14,10 +14,9 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path -from interludes import views +from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), - path('', views.home, name = 'home') + path('', include('home.urls')), ]