Django note3
来源:互联网 发布:通达信选股源码 编辑:程序博客网 时间:2024/05/17 04:22
1、templates(模板)/static(静态文件)
1.1、使用时建立在项目文件夹下,与app同级
1.2、修改项目文件setting.py中的路径
1.3、templates包括html文件、static包括css、js、image、svg(矢量图片、xml文本描述)等资源
2、django template language
{%text%}
{{variable}}
3、resolve/reverse
4、{% static %}
4.1、The {% static %} template tag uses the STATIC_URL configuration in the settings.py to compose the final URL
4.2、The template tag {% static %} is used to compose the URL where the resource lives. In this case, the {% static ‘css/bootstrap.min.css’ %} will return /static/css/bootstrap.min.css, which is equivalent to http://127.0.0.1:8000/static/css/bootstrap.min.css.
5、admin(Django自带后台)
python manage.py createsuperuser
注册Board models from .models import Board
(.表示在当前目录下的model文件) admin.site.register(Board)
(注册model)
阅读全文
0 0
- Django note3
- Project Note3
- note3 使用
- SQL note3
- cs229-note3
- C++note3
- Mysql.Note3
- Struts Learning Note3 --- Action
- Code Complete --- (Note3 Variables)
- effective c++ note3
- JAVA self study note3
- 三星NOTE3 N900 刷机
- HTML--Note3--link
- 3-PCI局部总线note3
- WCF Note3 (Fault and Exception)
- Windows Game Note3
- note3 设置系统提示音
- note3版本介绍,优劣总结
- 多图片上传,涉及图片的压缩处理(未完)
- 【项目管理和构建】十分钟教程,eclipse配置maven + 创建maven项目(三)
- Get filename and path from URI from mediastore
- linux自动以root登录,并自动启动用户程序的设置方法(适合sysVinit启动机制)
- 操作纪录 | github注册和windows版git客户端设置
- Django note3
- Maven 手动添加 JAR 包到本地仓库
- JAVA学习笔记
- Protocol Buffer使用实例
- 如何编写测试计划
- Json转换利器Gson之-实际开发中的特殊需求处理(手动解析-TypeToken处理)
- spring的@Transactional注解详细用法
- HGDB PG表中添加删除列
- Codeforces