跟老齐学python django_跟老齐学Python Django实战 2/n Second edition

#1

I deleted the whole virtual folder, creating a new one, and reinstall the Django package , but I still can't find "django-admin";

Installing collected packages: pytz, sqlparse, Django

Successfully installed Django-2.2.12 pytz-2019.3 sqlparse-0.3.1

(laqidjango) cor@debian:~/laqidjango$ clear

(laqidjango) cor@debian:~/laqidjango$ ls

bin include lib local share

(laqidjango) cor@debian:~/laqidjango$ find |grep django-admin

(laqidjango) cor@debian:~/laqidjango$

#1.1,venv module is embedied since python3.3, the right way to start is:

python3.5(or above) -m venv lqdjango

cd lqdjango

source bin/active

pip3 install Django

#1.2 then , we can grep it inside the venv.

(lqdj1) cor@debian:~/lqdj1$ find |grep django-admin

./lib/python3.5/site-packages/django/bin/__pycache__/django-admin.cpython-35.pyc

./lib/python3.5/site-packages/django/bin/django-admin.py

./bin/__pycache__/django-admin.cpython-35.pyc

./bin/django-admin.py

./bin/django-admin

#2,

(laqidjango) cor@debian:~/laqidjango$ ls

bin include lib local share

(laqidjango) cor@debian:~/laqidjango$ pwd

/home/cor/laqidjango

python3 -m django startproject mysite

(laqidjango) cor@debian:~/laqidjango$ cd mysite/

(laqidjango) cor@debian:~/laqidjango/mysite$ ls

manage.py mysite

(laqidjango) cor@debian:~/laqidjango/mysite$ tree

.

├── manage.py

└── mysite

├── __init__.py

├── settings.py

├── urls.py

└── wsgi.py

1 directory, 5 files

#4

python3 manage.py startapp blog

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值