Difference between revisions of "Creating a Django Web App"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "=Setup - Visual Studio= Create a new project in Visual Studio, look in the python section and Django: File:Vswebapp.png On your own machines, this will install all of th...")
 
(Setup - Visual Studio)
Line 2: Line 2:
 
Create a new project in Visual Studio, look in the python section and Django:
 
Create a new project in Visual Studio, look in the python section and Django:
  
[[File:Vswebapp.png]]
+
[[File:Django1.gif]]
  
 
On your own machines, this will install all of the appropriate packages into your python installation if you select 'Install into Python'. However in College will will need to do a bit more, and instead choose 'install into virtual environment':
 
On your own machines, this will install all of the appropriate packages into your python installation if you select 'Install into Python'. However in College will will need to do a bit more, and instead choose 'install into virtual environment':
Line 24: Line 24:
 
Now click start in Visual Studio, you should see something like this:
 
Now click start in Visual Studio, you should see something like this:
  
[[File:Vswebapp4.png]]
+
[[File:Django2.gif]]
  
 
It should automatically open a browser, it should already point to your web app:
 
It should automatically open a browser, it should already point to your web app:
  
[[File:Vswebapp5.png]]
+
[[File:Django3.gif]]

Revision as of 18:49, 10 April 2019

Setup - Visual Studio

Create a new project in Visual Studio, look in the python section and Django:

Django1.gif

On your own machines, this will install all of the appropriate packages into your python installation if you select 'Install into Python'. However in College will will need to do a bit more, and instead choose 'install into virtual environment':

Vswebapp1.png

In College we will need see this window:

Vswebapp2.png

You can untick the install packages option, because this will fail on college computers.

Now, find the folder within your project folder:

Vswebapp3.png

Now download this zip file and extract its contents into this folder:

Vswebapp6.png

Now click start in Visual Studio, you should see something like this:

Django2.gif

It should automatically open a browser, it should already point to your web app:

Django3.gif