Refactor project structure: remove 'home' app and create 'front' app with updated templates, views, and URLs

This commit is contained in:
Jesper Thøgersen 2025-09-20 17:19:43 +02:00
parent 97e8cf465c
commit 269ee8cbce
11 changed files with 6 additions and 18 deletions

View file

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello</title>
<title>{{ title }}</title>
</head>
<body>
<h1>Hello, {{ name }}!</h1>
<h1>{{ title }}</h1>
</body>
</html>

View file

@ -2,5 +2,5 @@ from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='home'),
path('', views.index, name='index'),
]

View file

@ -1,5 +1,5 @@
from django.shortcuts import render
def index(request):
context = {'name': 'Jesper'}
context = {'title': 'OpenREKO'}
return render(request, 'index.html', context)

View file

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

View file

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

View file

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

View file

@ -37,7 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'home',
'front',
]
MIDDLEWARE = [

View file

@ -19,5 +19,5 @@ from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('home.urls')),
path('', include('front.urls')),
]