app01\model.py from django.db import models # Create your models here. class Depart(models.Model): id = models.AutoField(primary_key=True) title = models.CharField(verbose_name="部门名称", max_length=32) class UserInfo(models.Model): id = models.Aut…
Object.extend=function(props){ //继承父类 var prototype=Object.create(this.prototype) //初始化函数ctor var _Class=function(){ if (this.ctor) this.ctor.apply(this, arguments); } //当前类属性和方法 for(var k in props){ prototype[k]= props[k] } _Class.prototype = protot…
一.配置 stark组件开发,仿django自带得admin组件. 1. startapp stark 2. settings: 'stark.apps.StarkConfig' 3. 启动就执行 from django.apps import AppConfig from django.utils.module_loading import autodiscover_modules class StarkConfig(AppConfig): name = 'stark' # 程序启动时,扫描a…