Django test

This commit is contained in:
Ben Jackson 2021-04-29 19:13:10 +01:00
commit 94e8a6d35b
17 changed files with 245 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,7 @@
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse( "Hello, world" )