Refactor project structure: remove 'home' app and create 'front' app with updated templates, views, and URLs
This commit is contained in:
parent
97e8cf465c
commit
269ee8cbce
11 changed files with 6 additions and 18 deletions
|
|
@ -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>
|
||||
|
|
@ -2,5 +2,5 @@ from django.urls import path
|
|||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='home'),
|
||||
path('', views.index, name='index'),
|
||||
]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
def index(request):
|
||||
context = {'name': 'Jesper'}
|
||||
context = {'title': 'OpenREKO'}
|
||||
return render(request, 'index.html', context)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class HomeConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'home'
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
|
@ -37,7 +37,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'home',
|
||||
'front',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@ from django.urls import include, path
|
|||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('home.urls')),
|
||||
path('', include('front.urls')),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue