mirror of
https://github.com/adrigongv23/G26---Telemetry-Software.git
synced 2026-08-25 03:23:17 +02:00
Creación de index.html y primera creación de la pagina principal
This commit is contained in:
parent
fd1c6250a4
commit
8d3205bf8f
9 changed files with 129 additions and 19 deletions
Binary file not shown.
|
|
@ -1,6 +1,14 @@
|
|||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from temporadas.models import Temporada
|
||||
|
||||
def home(request):
|
||||
# Esta función es la que decide qué mostrar cuando alguien entra a la web
|
||||
return HttpResponse("<h1>¡Bienvenido a la Plataforma de Gades! 🏎️💨</h1><p>Sistema de Telemetría y Gestión v1.0</p>")
|
||||
@login_required
|
||||
def inicio(request):
|
||||
# Buscamos la temporada que configuraste como actual
|
||||
temporada_activa = Temporada.objects.filter(actual=True).first()
|
||||
|
||||
context = {
|
||||
'temporada_actual': temporada_activa
|
||||
}
|
||||
# Renderiza index.html, el cual hereda automáticamente de base.html
|
||||
return render(request, 'index.html', context)
|
||||
Loading…
Add table
Add a link
Reference in a new issue