Professional Documents
Culture Documents
Submitted By
Sarthak Goyal
Enrolment No.: R110218138
SAP ID: 500067706
Semester VI
B. Tech. (Computer Sc. and Engineering)
Specialization in CCVT
Submitted To
Ms. Shelly
Experiment 3:
Aim: Launch some website workload on cloud platform.
Requirements: Python(2.7.x or 3.4.x), virtualenv, Django, Any IDE(Microsoft Visual Code,
Atom), easy_install, pip.
Step 1: Setup Django Project
Go to the virtual environment cloudapp created in the previous experiment & run the
following command to create a new project
2
Roll No: R110218138 CAD LAB
SAP ID: 500067706
Step 2: To verify whether Django project works, change to outer mysite directory and run the
following command
Step 3: Now that our project is working, we will now start creating our first app named polls
using the following command
3
Roll No: R110218138 CAD LAB
SAP ID: 500067706
Step 4: To create the first view which will be visible on opening http://127.0.0.1:8000, open
the file polls/views.py and put the following Python code in it:
To call the view, we need to map it to a URL - and for this we need a URLconf.
Step 5: To create a URLconf in the polls directory, create a file called urls.py and put the
following Python code in it:
4
Roll No: R110218138 CAD LAB
SAP ID: 500067706
The next step is to point the root URLconf at the polls.urls module.
Step 6: In mysite/urls.py, add an import for django.urls.include and insert an include() in the
urlpatterns list:
5
Roll No: R110218138 CAD LAB
SAP ID: 500067706
Step 7: Verify app’s working with the following command:
END OF EXERCISE