Django test
This commit is contained in:
parent
0c88cc8bad
commit
94e8a6d35b
17 changed files with 245 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
5
support/test/python/simple_django/mysite/example/apps.py
Normal file
5
support/test/python/simple_django/mysite/example/apps.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PollsConfig(AppConfig):
|
||||
name = 'example'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
8
support/test/python/simple_django/mysite/example/urls.py
Normal file
8
support/test/python/simple_django/mysite/example/urls.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path( '', views.index, name='index' )
|
||||
]
|
||||
|
||||
|
|
@ -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" )
|
||||
Loading…
Add table
Add a link
Reference in a new issue