ubuntu16.04安装Django
2016-08-25 20:57
253 查看
安装官方源
1),sudo apt-get update
sudo apt-get install python-django
安装djange官方源
1),sudo apt-get update
for python2
2),sudo apt-get install python-pip
sudo pip install django
for python3
2),sudo apt-get install python3-pip
sudo pip3 install django
Django basic usage
1, django-admin startproject ostechnix
2, ls ostechnix/
Sample output:
manage.py ostechnix
3, cd ostechnix/
run the following command to bootstrap the database:
python manage.py migrate
Note: If you use python 3 or earlier versions, you should use “python3 manage.py migrate” without quote
4,we need to create an administrative user.To do so, run:
python manage.py createsuperuser
Enter the username (leave blank to use the current username), password
5,run the following command to start the Django development server.
python manage.py runserver 0.0.0.0:8000
webbroser login in http://:8000
To access thee Django server’s admin page, go to http://IP-Address:8000/admin.
Enter the username and password that you have created earlier.
—–ansible yml
1),sudo apt-get update
sudo apt-get install python-django
安装djange官方源
1),sudo apt-get update
for python2
2),sudo apt-get install python-pip
sudo pip install django
for python3
2),sudo apt-get install python3-pip
sudo pip3 install django
Django basic usage
1, django-admin startproject ostechnix
2, ls ostechnix/
Sample output:
manage.py ostechnix
3, cd ostechnix/
run the following command to bootstrap the database:
python manage.py migrate
Note: If you use python 3 or earlier versions, you should use “python3 manage.py migrate” without quote
4,we need to create an administrative user.To do so, run:
python manage.py createsuperuser
Enter the username (leave blank to use the current username), password
5,run the following command to start the Django development server.
python manage.py runserver 0.0.0.0:8000
webbroser login in http://:8000
To access thee Django server’s admin page, go to http://IP-Address:8000/admin.
Enter the username and password that you have created earlier.
—–ansible yml
- name: Install pip for python2 apt: name={{ item }} state=present with_items: - python-pip - name: pip Install django pip: name=django
相关文章推荐
- ubuntu16.04上用虚拟环境上安装django的指南
- Ubuntu16.04里django的配置和安装
- Ubuntu 16.04 Django安装和配置
- Ubuntu16.04里django的配置和安装
- Ubuntu server 16.04 配置 virtualenv virtualenvwrapper 和安装django
- Ubuntu16.04 下安装django出现ImportError: cannot import name patterns
- Ubuntu 16.04 安装Django时报错"python setup.py egg_info" failed with error code 1
- ubuntu下Django的下载与安装(三种方法)
- Ubuntu 安装Postgres数据库,Windows 安装PgAdmin进行远程管理,Django远程连接 手记
- ubuntu下安装apache2.2+mod_wsgi+django(一)
- ubuntu 13.04 安装 apache2.2+mod_wsgi+Django
- ubuntu中的django安装配置与操作
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- ubuntu 安装、配置django mod_python apache2 mysql
- ubuntu下安装apache2.2+mod_wsgi+django(一)
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- ubuntu下安装apache2.2+mod_wsgi+django(一)
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- ubuntu下安装apache2.2+mod_wsgi+django(一)
- ubuntu 10.04 server 下安装nginx1.2.0 + uwsgi-1.2 + django-1.4