Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Installation of Django

If you have not yet installed django on your system, install it using the below command:
$ sudo pip install django
Password:
Collecting django
Downloading Django-1.11.6-py2.py3-none-any.whl (6.9MB)
100% |████████████████████████████████| 7.0MB 174kB/s
Requirement already satisfied: pytz in /Library/Python/2.7/site-packages (from django)
Installing collected packages: django
Successfully installed django-1.11.6


After installation you can check the validity of the Django installation:
$ python -m django --version
1.11.6


What does -m do in the above command:
-m module-name
Searches sys.path for the named module and runs the corresponding .py file as a script.


To see list of django-admin subcommands:
$ django-admin help

Type 'django-admin help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runserver
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.)


That's it! Welcome to the Django world. :)

#python #django #installation #pip #django_part1
Install NPM packages from http or https:
npm config set registry https://registry.npmjs.org/

Sometimes because of filtering issues you need to download node packages from http so make sure to make it http:
npm config set registry http://registry.npmjs.org/

#node #npm #shit #installation #config