password
URL
type
status
date
slug
summary
tags
category
icon
周起始
标签
是否汉化
【等待】不是为了你能回来,而是找个借口让你不离开
Django_MTV架构

项目创建及新增应用字段设置
创建项目,项目名为 django_train
创建表 初始化
创建用户
配置中文页面
项目目录说明 pycharm
- asgi.py 异步网关接口
- settings.py 整个项目的配置文件
创建应用(例:招聘职位管理后台)
模型定义 jobs/models.py
将model-job注册到管理后台admin
进行数据表同步
再次访问后台


优化列表页及新增页面字段展示等

MEMO
MEMO
- 在django后台管理页面-新建应用-创建相关字段
1. 创建应用、添加应用 python manage.py startapp jobs ; 添加jobs
2. 创建models-相关字段 model. 参考模型详解
3. 注册应用jobs
4. 表数据初始化&同步 python manage.py makemigrations ; python manage.py migrate
5. 页面字段展示优化设置 admin.py
离开乏味的皮囊,自由的灵魂在路上
- Name: Alan Hsu
- Tag: 随感、技术、经验、旅行、推荐、生活、音乐、电影 etc.
- Email:xulanzhong521gmail.com
- Twitter:@AlanHsu521
- Telegram:@AlanHsu521
- WeChat: Alan_Hsu_521
- Github: https://github.com/xsoway/
- Blog: https://xmylog.com


- Author:Alan_Hsu
- URL:https://xmylog.com/article/articles_django-1
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts