As we have discussed earlier related to MySQL Connection to python in our previous article. Here, we will discuss about installing DJango Full Stack Framework for Web development in Python. Django is a full stack framework that contains lightweight server also. You will not need apache until you want to deploy your website. We will also go through an example for testing the Framework. We have assumed that proper version of pip is installed and path is set proper.
pip install django
To confirm if proper installation is done you can write a command
python -m django --version
After installing Django, now we have to next step that is installation of framework. Now use cd command to change the directory where you want to work and store your applications. in my example I am moving to d:\djangosites
Now to start a project you have to give command like
django-admin startproject myprojects
New Directory named myprojects will be created and you can find manage.py and one directory named myprojects here. Inner directory myprojects will contain files like _init_.py, settings.py, urls.py and wsgi.py. They will be used later.
Now it’s the time to test your server. To test the server move to outer myproject folder in Command Prompt and type the command.
python manage.py runserver
Now you can test the url http://127.0.0.1:8000/ in your browser.
In our next article we will learn how to create applications in Django Python.