Init
This commit is contained in:
commit
97e8cf465c
19 changed files with 542 additions and 0 deletions
0
home/__init__.py
Normal file
0
home/__init__.py
Normal file
3
home/admin.py
Normal file
3
home/admin.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
home/apps.py
Normal file
6
home/apps.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class HomeConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'home'
|
||||
0
home/migrations/__init__.py
Normal file
0
home/migrations/__init__.py
Normal file
3
home/models.py
Normal file
3
home/models.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
9
home/templates/index.html
Normal file
9
home/templates/index.html
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hello</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, {{ name }}!</h1>
|
||||
</body>
|
||||
</html>
|
||||
3
home/tests.py
Normal file
3
home/tests.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
6
home/urls.py
Normal file
6
home/urls.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='home'),
|
||||
]
|
||||
5
home/views.py
Normal file
5
home/views.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
def index(request):
|
||||
context = {'name': 'Jesper'}
|
||||
return render(request, 'index.html', context)
|
||||
Loading…
Add table
Add a link
Reference in a new issue