• python 学习1


    安装环境

    python(2.7.x)(64位) + django(1.9.7) + python-mysql(64位)

     安装python时自带pip与easy_install,因此可用 pip install django , pip install python-mysql

    新建项目

    django-admin.py startproject py_fir , py_fir为项目名

    python manage.py runserver 8080, 在浏览器打开127.0.0.1:8080

    再建一个应用app, python manage.py startapp blog

    各个目录的作用详见 http://www.cnblogs.com/fengzheng/p/3819595.html

    在 setting.py中的INSTALL_APPS中添加应用blog

     

    urls.py:

    views.py:

    在blog目录下新建template/a.html

     python manage.py runserver 8080

    在浏览器打开 http://localhost:8080/hello

    引用了博客

    http://www.cnblogs.com/fengzheng/p/3819595.html

  • 相关阅读:
    Idea 2017的激活方式
    Hash校验
    释放自己
    不再等待
    常用数据结构及类
    My Construct
    西安商洛之行
    delphi locate多字段查询
    对于沟通的理解
    My Interface
  • 原文地址:https://www.cnblogs.com/hackers/p/5585242.html
Copyright © 2020-2023  润新知