UNC BACS 350

Web Apps with Python/Django

Logo

Lesson 2 - Django Projects & Apps

LEARN

Reading - Django for Beginners

Github

Git

Using Github

Virtual Environments

Activate Virtual Environment

BUILD

Development Workflow

Install Python Code Editor

Tiled Windows

Create New Project

Activate the Virtual Environment

$ cd BACS350

$ pipenv shell

Create a new directory

$ cd week1

$ mkdir Hello

$ cd Hello

Create a Django project

$ django-admin startproject config .

Run Development Server

Run the web server

$ python manage.py runserver

Don't worry about the warning for "unapplied migrations"

Browse to web page

http://localhost:8000

You should see

Use Ctrl-C to kill the server

Commit Your Code

Git add

$ git add .

$ git status

Git commit

$ git commit -m 'Create Hello app'

$ git status

Get push

$ git push

$ git status

Project 1 - Part B

Commit all of your code and push

Next Lesson

Configure a Django project and build views