This commit is contained in:
2022-05-05 13:32:40 +08:00
commit 14753288c6
25 changed files with 308 additions and 0 deletions

1
apps/apptest/__init__.py Normal file
View File

@@ -0,0 +1 @@

6
apps/apptest/admin.py Normal file
View File

@@ -0,0 +1,6 @@
from django.contrib import admin
from .models import *
@admin.register(AppTest)
class AppTestAdmin(admin.ModelAdmin):
pass

7
apps/apptest/apps.py Normal file
View File

@@ -0,0 +1,7 @@
from django.apps import AppConfig
class ApptestConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'apps.apptest'
verbose_name = '测试表单' # 名称

View File

@@ -0,0 +1,26 @@
# Generated by Django 4.0.4 on 2022-05-05 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='AppTest',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100, verbose_name='标题')),
],
options={
'verbose_name': '测试表单',
'verbose_name_plural': '测试表单',
'db_table': 'app_test',
},
),
]

View File

8
apps/apptest/models.py Normal file
View File

@@ -0,0 +1,8 @@
from django.db import models
class AppTest(models.Model):
title = models.CharField(max_length=100, verbose_name='标题')
class Meta:
db_table = 'app_test'
verbose_name = '测试表单'
verbose_name_plural = verbose_name

3
apps/apptest/tests.py Normal file
View File

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

3
apps/apptest/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.