First commit

This commit is contained in:
mrtoine 2025-09-12 11:07:53 +02:00
commit 440f5a7df4
1563 changed files with 217996 additions and 0 deletions

0
home/__init__.py Normal file
View file

3
home/admin.py Normal file
View file

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

6
home/apps.py Normal file
View file

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

View file

3
home/models.py Normal file
View file

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

3
home/tests.py Normal file
View file

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

7
home/urls.py Normal file
View file

@ -0,0 +1,7 @@
from django.urls import path
from . import views
app_name = 'home'
urlpatterns = [
path('', views.home, name='home'),
]

6
home/views.py Normal file
View file

@ -0,0 +1,6 @@
from django.shortcuts import render
from courses.models import Course
def home(request):
courses = Course.objects.order_by('-created_at')[:6]
return render(request, 'home.html', {'courses': courses})