0% found this document useful (0 votes)
13 views

Lecture3 PDF

This document discusses web programming using Python and JavaScript. It covers HTTP and status codes like 200 for OK and 404 for Not Found. It introduces Django, a Python web framework, and how to install and start a Django project using commands like pip3 install Django and django-admin startproject. It also mentions running the local web server with python manage.py runserver and generating app files with python manage.py startapp.

Uploaded by

Moudi Mouhamadou
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lecture3 PDF

This document discusses web programming using Python and JavaScript. It covers HTTP and status codes like 200 for OK and 404 for Not Found. It introduces Django, a Python web framework, and how to install and start a Django project using commands like pip3 install Django and django-admin startproject. It also mentions running the local web server with python manage.py runserver and generating app files with python manage.py startapp.

Uploaded by

Moudi Mouhamadou
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Web Programming

with Python and JavaScript


Django
Web Applications
HTTP
GET / HTTP/1.1
Host: www.example.com
...
HTTP/1.1 200 OK
Content-Type: text/html
...
HTTP Status Codes
Status Code Description

200 OK

301 Moved Permanently

403 Forbidden

404 Not Found

500 Internal Server Error


Django
pip
pip3 install Django
django-admin startproject PROJECT_NAME
Project Files

• manage.py: utility for interacting with project


• PROJECT_NAME/settings.py: settings and configuration
• PROJECT_NAME/rls.py: URLs that can be visited
python manage.py runserver
python manage.py startapp APP_NAME
Django
Web Programming
with Python and JavaScript

You might also like