im@58user:/$ python Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
tar xzvf Django-1.11.x.tar.gz cd Django-1.11.x sudo python setup.py install
sudo https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
python setyp.py install```
sudo apt-get install mysql-server mysql-client sudo apt-get install libmysqld-dev
sudo apt-get install python-dev sudo wget https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip unzip MySQL-python-1.2.5.zip cd MySQL-python-1.2.5/ sudo python setup.py install
> * sudo mysql * mysql -u root -p 然后输入密码
mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> update user set Password = PASSWORD(‘root') where User ='root'; Query OK, 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> exit
im@58user:~/PythonProjects$django-admin.py startproject Hello im@58user:~/PythonProjects$ cd Hello/ im@58user:~/PythonProjects/Hello$ tree ├── Hello │ ├── init.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py
im@58user:~/PythonProjects/Hello$ touch views.py im@58user:~/PythonProjects/Hello$ ls Hello manage.py views.py im@58user:~/PythonProjects/Hello$ tree . ├── Hello │ ├── init.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── manage.py └── views.py 1 directory, 6 files
from django.http import HttpResponse def hello(request): return HttpResponse(“Hello World~!~!”)
from django.conf.urls import url from django.contrib import admin from views import hello urlpatterns = [ url(r'^admin/‘, admin.site.urls), url(r'^hello/‘, hello), ]
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有