django

来源:互联网 发布:剑灵灵女萌捏脸数据图 编辑:程序博客网 时间:2024/05/16 10:28


java
project:
    pacage.....
django
project
    manage.py ------admin tool
    application(model*,package*) install
            urls.py  --路由规则
                settings.py  project设置
                wsgi.py --web server grate interface


            views.py -- controller
           

                              models.py -- entity framework

                              manage.py startapp student

    views.py
手动添加一个静态资源的目录
配置一个settings.py 里面的TEMPLATES==>DIRS
在html下创建一个hello.html的文件
编写views.py
def hello(request):
    render(request,"hello.hemt")
配置路径urls.py
from student import views as studentViews
url(r'^student/hi$',studentViews.hello)

原创粉丝点击