你可能已经注意到我们在例子视图中返回文本的方式有点特别. 也就是说,HTML被直接硬编码在 Python代码之中. def current_datetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html) 尽管这种技术便于解释视图是如何工作的,但直
1.安装python环境 1.1 安装python包管理器: wget https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py 1.2 安装python虚拟环境virtualenv virtualenvwrapper 首先说明下为什么要装这两个包: First, it's important to understand that a virtual environment is a special tool used to ke
第一步:安装php套件 目前为止laravel是5.1版本,需要对php有要求,要php5.59以上 The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine: * PHP >= 5.5.9 * OpenSSL PHP Extension * PDO PHP Exte