Installation of Django
If you have not yet installed django on your system, install it using the below command:
After installation you can check the validity of the
What does
To see list of
That's it! Welcome to the
#python #django #installation #pip #django_part1
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