création de la page d'accueil

This commit is contained in:
Laetitia Getti 2023-03-17 17:04:19 +01:00
parent ddabc9afca
commit 288a8a1f65
19 changed files with 35 additions and 1 deletions

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View file

@ -0,0 +1,6 @@
from django.apps import AppConfig
class HomeConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'la_chariotte.home'

View file

View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>La Chariotte</title>
</head>
<body>
<p>Chariotte</p>
</body>
</html>

View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View file

@ -0,0 +1,5 @@
from django.views.generic import TemplateView
class HomeView(TemplateView):
"""Page d'accueil de la Chariotte"""
template_name = "home/home.html"

View file

@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'la_chariotte.home',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',

View file

@ -14,8 +14,11 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path, include
from .home import views
urlpatterns = [ urlpatterns = [
path('', views.HomeView.as_view(), name="home"),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]