Difference between revisions of "Creating a Django Web App"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Setup - Visual Studio)
(Setup - Visual Studio)
Line 14: Line 14:
 
You can untick the install packages option, because this will fail on college computers.
 
You can untick the install packages option, because this will fail on college computers.
  
Now, find the folder within your project folder:
+
Now, find the site packages folder within your project folder:
  
[[File:Vswebapp3.png]]
+
[[File:Django4.gif]]
  
Now download this [https://studentthomrothac-my.sharepoint.com/:u:/g/personal/wayne_jones_thomroth_ac_uk/EQ8i32igVu5GmMqEm8g_o3YBJ7IL3Hd0oteHBbq4MW_i7Q?e=1cVU7T zip file] and extract its contents into this folder:
+
Extract this zip file: [https://studentthomrothac-my.sharepoint.com/:u:/g/personal/wayne_jones_thomroth_ac_uk/EeJ3eFG9rENLp-6Wt84AOwoBQ73SAXJIe4V5ulpXacNzcQ?e=HfCo4d Django 1.11.20]
  
[[File:Vswebapp6.png]]
+
You should now have:
  
 
Now click start in Visual Studio, you should see something like this:
 
Now click start in Visual Studio, you should see something like this:

Revision as of 20:12, 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 site packages folder within your project folder:

Django4.gif

Extract this zip file: Django 1.11.20

You should now have:

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