18
Getting started with 1.8

Getting started with Django 1.8

Embed Size (px)

Citation preview

Page 1: Getting started with Django 1.8

Getting started with

1.8

Page 2: Getting started with Django 1.8

Rajkumar R.CEO / Django Developer

PurpleFly.me Design Lab

[email protected]

Page 3: Getting started with Django 1.8

2003 2005 2008BSD License DSF

Page 4: Getting started with Django 1.8

Django

Officially,

Django is a web framework

A high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Page 5: Getting started with Django 1.8

Python

2.7.10 +

Page 6: Getting started with Django 1.8

Installing Django

$ pip install django

$ python>>> import django>>> print(django.get_version())1.8.4

Page 7: Getting started with Django 1.8

Creating a Project in Django

$ django-admin startproject myproject

cd into your destination directory

Page 8: Getting started with Django 1.8

Creating a Project in Django

Open your project directory

myproject/manage.py

myproject/ __init__.py

settings.py urls.py wsgi.py

Page 9: Getting started with Django 1.8

Initiate Database

Initiate Database

$ python manage.py migrate

Page 10: Getting started with Django 1.8

Sqlite3 Database created

Open your project directory

myproject/manage.py

myproject/ __init__.py settings.py urls.py wsgi.py

db.sqlite3

Page 11: Getting started with Django 1.8

Run Django's Inbuilt-Server

Run the Server

$ python manage.py runserver

Page 12: Getting started with Django 1.8

Running the Django Project

127.0.0.1:8000

Page 13: Getting started with Django 1.8

Live Django Project!

Page 14: Getting started with Django 1.8

How it works?

Browser

Web Server

urls.py

views.py

settings.py

Django

Request (POST/GET) Response (html)

Database

Page 15: Getting started with Django 1.8

Time to Screen!

Python 3.4 | Django 1.8.4 | Fedora 22

Page 16: Getting started with Django 1.8

Next…

How to return html pages ?

How to return html pages with css, js and images?

How to create and work with database tables?

How to handle POST/GET requests?

How to create forms?

How to scale a django project?

Page 17: Getting started with Django 1.8

www.djangoproject.com

Page 18: Getting started with Django 1.8

[email protected]

@rajkumartreads

Thank you