Setting Up Django on Windows
Django is a Web development framework written in Python. Therefore it has all the advantages of Python. Setting up Django in Linux is pretty straightforward, but Windows is different. This tutorial takes you through the process of installing Django in a W
Django is a free and open source Web framework, written in Python, which follows the model-view-template (MVT) architectural pattern. It is maintained by the Django Software Foundation (DSF). Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasises code readability, and its syntax allows programmers to express concepts in fewer lines of code than is possible in languages such as C++ or Java. The language provides constructs intended to enable writing clear programs on both a small and large scale.
About pip
pip is a package manager for Python. It makes installing and uninstalling Python packages (such as Django) very easy. For the rest of the installation, we’ll use pip to install Python packages from the command line.
Configuring PowerShell
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command line shell and an associated scripting language built on the .NET framework. To find PowerShell, click Start -> Search for PowerShell -> Right click and select Run as administrator . A pop-up box will ask, “Do you want to allow this app to make changes to your PC?” Click on ‘Yes’.
Once you have completed the above commands, your PowerShell will look like what’s shown in Figure 1.
By using the following command, we can switch out of the system folder:
$ cd ~
RemoteSigned will let you run scripts and configuration files downloaded from the Internet, which have been signed by trusted publishers. So we will use RemoteSigned here.
$ Set-ExecutionPolicy -Scope CurrentUser
PowerShell will ask about the ExecutionPolicy; we are using RemoteSigned execution.
Once you press Enter, PowerShell will inform you about security and ask, “Do you want to change the execution policy?” Press ‘Y’ for yes.
Now we can check if the current user is trusted or not.
$ Get-ExecutionPolicy -List
The output looks like what’s shown in Figure 2.
This confirms that the current user can run trusted scripts downloaded from the Internet.