password
URL
type
status
date
slug
summary
tags
category
icon
标签
是否汉化
【等待】不是为了你能回来,而是找个借口让你不离开
Django_MTV架构
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F273fb8bd-268f-40e4-9a02-0d98bc877148%2FUntitled.png?table=block&id=d172613b-47b4-4893-96cb-cda73eb8b501&t=d172613b-47b4-4893-96cb-cda73eb8b501&width=2386&cache=v2)
项目创建及新增应用字段设置
创建项目,项目名为 django_train
创建表 初始化
创建用户
配置中文页面
项目目录说明 pycharm
- asgi.py 异步网关接口
- settings.py 整个项目的配置文件
创建应用(例:招聘职位管理后台)
模型定义 jobs/models.py
将model-job注册到管理后台admin
进行数据表同步
再次访问后台
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2Fc51a6965-f60b-4195-b160-010c918869ec%2FUntitled.png?table=block&id=45ad5373-07cf-462b-a6df-94c1ff3a1673&t=45ad5373-07cf-462b-a6df-94c1ff3a1673&width=576&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F710eb186-9bd6-4a73-aeab-ef17855eb6eb%2FUntitled.png?table=block&id=8946ba44-e054-4530-9087-c632decc8846&t=8946ba44-e054-4530-9087-c632decc8846&width=576&cache=v2)
优化列表页及新增页面字段展示等
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F23471bee-0f19-404d-8c2b-f27d8a1ba359%2FUntitled.png?table=block&id=fb595428-0f79-4bc3-8510-ad1a1a0c877f&t=fb595428-0f79-4bc3-8510-ad1a1a0c877f&width=864&cache=v2)
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/
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/wechat.jpeg?t=0ad0bcf3-0ebe-494c-b0c5-818d4266448d)
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/%E5%85%AC%E4%BC%97%E5%8F%B7.jpeg?t=6d1715c9-b89d-4671-be29-28ddcb57df87)
- 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