add the frontend app

This commit is contained in:
Matteo Rosati
2026-02-10 20:32:37 +01:00
parent 266a1249d7
commit 2805c92dc8
11 changed files with 40 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [
"api",
"frontend",
"rest_framework",
"rest_framework_simplejwt",
"rest_framework_simplejwt.token_blacklist",

View File

@@ -19,6 +19,7 @@ from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path("", include("frontend.urls")),
path("admin/", admin.site.urls),
path("api/", include("api.urls")),
]

0
frontend/__init__.py Normal file
View File

3
frontend/admin.py Normal file
View File

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

5
frontend/apps.py Normal file
View File

@@ -0,0 +1,5 @@
from django.apps import AppConfig
class FrontendConfig(AppConfig):
name = 'frontend'

View File

3
frontend/models.py Normal file
View File

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

View File

@@ -0,0 +1,11 @@
<!doctype html>
<html lang="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DroneWars</title>
</head>
<body>
<h1>Ciao e benvenuto su DroneWars!</h1>
</body>
</html>

3
frontend/tests.py Normal file
View File

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

8
frontend/urls.py Normal file
View File

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

5
frontend/views.py Normal file
View File

@@ -0,0 +1,5 @@
from django.shortcuts import render
def home(request):
return render(request, "frontend/home.html")