标签:mode user password start har rate 路径 join name
1、创建APP
1.python manage.py startapp app01
2.配置模板路径 setting.py TEMPLATERS
‘DIRS‘:[os.path.join(BASE_DIR,‘templates‘]
‘DIRS‘:[os.path.join(BASE_DIR,‘app01/templates‘]
2、数据库创建
1.settings.py 配置INSTALLED_APP 加入对应的APP
2.models.py 创建表
exp:
class Username(model.Model):
username = model.CharField(max_length=32)
password = model.CharFielld(max_length=32)
3.python manage.py makemigrations
4.python manage.py migrate
3、数据库操作
标签:mode user password start har rate 路径 join name
原文地址:https://www.cnblogs.com/armyz6666666/p/9321587.html