Tuesday, 17 April 2018

Commands to install Django and all it commands.


How to install Django? along with all the Django related commands.

Once you have installed python, check the folder scripts where easy_install.exe  is there. This easy_install.exe will help you to install Django framework.

Here are few important commands which you have to run in command prompt.

1. To install Django:-

easy_install django


2. To check django version installed on your system:

django-admin --version


3. To create a project by django

django-admin startproject <website-name>

Once you run this command folder will be created by the name which you have passed the website-name. Where all the setting and urls with be there default. Now there you have to do you changes further.

4. To run the server
move to the folder where your manage.py file is then type in command prompt
python manage.py runserver

5. To create an app

python manange.py startapp <app-name>

6. It sync your data with database.

 python manage.py migrate

7. python manage.py makemigrations <app-name>

If you are creating model and adding apps in the manage.py then run the migration command
once you have makemigrations run again:-

python manage.py migrate

Sunday, 15 April 2018

How to install Python in windows operating system


Let's see haw to install python version 3.6.5. To install it and check it's version installed on your system (for me windows 10 OS  32-bit) i followed few steps which i wanted to share with you.

Here are the steps:-



  1. First of all download python(3.6.5) version which i have downloaded to install. Download from the link :- https://www.python.org/
  2.  Now created a folder named python manually in C:\Program Files (x86)  
  3. Once created go to the downloaded python .exe file and run that as an ADMINISTRATOR.  Once you would run as administrator you would see the screen like :-                                                                                                                                                                                       
  4. Install it by Customize Installation. by checking the checkbox just below in the screen written Add Python 3.6 to PATH.

  5. Now click on Customize Installation. Leave everything as it is checked in the next screen. Then click next. Next screen will look like:-

  6. Here you have to change the path location where we had created a folder called python in location C:\Program Files (x86). change the python installation path to this one now.


  7. Now click on the Install button. As soon as you click on the Install python installation will be processed. Final installation page will look like this which shows you have installed python successful on your system. Congratulations!


  8. How to check the version installed on you system?Open command prompt and type python --version you would get the version installed on your system.



    That's it. Thank you so much.