Download presentation
Presentation is loading. Please wait.
1
Django in the real world
Susan Ibach Christopher Harrison
2
Susan Ibach @hockeygeekgirl
Senior Technical Evangelist, Microsoft Canada Data, code and cloud Longtime MCT Blogs at Canadian Developer Connection Runner and hockey mom @hockeygeekgirl
3
Christopher Harrison @geektrainer
Senior Content Producer - Microsoft Virtual Academy Web guy <3 OSS Long-time Microsoft Certified Trainer Periodic blogger (blog.geektrainer.com) Marathoner, husband, father of one four-legged child @geektrainer
4
Agenda 1 Creating and managing a Django application 3
Forms and next steps 2 Security
5
Creating a Django application
6
Creating a Django application
What are we about to create? What are the requirements? Why use Django?
7
What are we about to create?
Application to manage a conference Display sessions, speakers and tracks
8
What are the requirements?
Easy to navigate Partial page updates where appropriate Allow people to submit sessions They must register first Allow conference organizers to easily modify data Manage tracks Approve sessions Host in Azure
9
Why use Django? Built-in administration page Automatic form generation
Easy to manage users and security Minimize code and effort
10
Installing Python & Django
11
Creating the project Getting started
12
Options for creating a Django project
Use a Visual Studio template Use django-admin
13
What is django-admin Command-line utility for managing Django
Create applications and apps Manage super users Migrate databases
14
Why use django-admin It's what the Django people use
Ability to use templates Server-side libraries Authentication Security Client-side frameworks Single page apps Bootstrap
15
Using django-admin and Visual Studio
Create empty Django project in Visual Studio Delete everything from the folder (except the proj & sln files) Use django-admin to create the project django-admin startproject <project-name> <containing-folder>
16
Creating a Django project
17
Creating the app
18
Using django-admin to create an app
Why? Automatically creates: models.py views.py migrations Usage django-admin startapp <app-name> <folder-name> After creation Include folder in Visual Studio Add app as installed apps in settings.py
19
Creating a Django app
20
Creating the models
21
Object model Title Abstract Session Name Title Bio Speaker Title
* Name Title Bio Speaker Title Description Track 1 1
22
Creating the models
23
Creating the database
24
Database management review
makemigrations Create a new migration, this creates a package that contains all of the changes to be made to the database based on the code changes in our models sqlmigrate Display the SQL statements that will be applied by a migration migrate Update the database with the specified migration package
25
Getting the database setup
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.