SlideShare a Scribd company logo
Django
Framework
The web framework for
perfectionists with deadlines
Rosario Renga rosario.renga@ericsson.com
1. What is Django
2. What is Python
3. Django’s Capabilities
a. All-in-One and Ready to Use
b. Modularity
c. Pattern: MTV and DRY
d. Deployment strategies
4. Useful Links
Summary
› Django is a high-level Python Web framework.
› Rapid development and clean, pragmatic design.
› Focus on writing your app without needing to reinvent the
wheel.
› It’s free and open source.
From https://www.djangoproject.com/
What is Django ?
 Instagram: http://instagram.com/
 Pinterest: https://www.pinterest.com/
 The Washington
Post:http://www.washingtonpost.com/
 Mozilla’s blog: http://blog.mozilla.org/webdev/
 My blog!  http://blog.itsmurfs.it/
Who use Django ?
 Enterprise Point Of View
 Free and Open-source.
 Thousand of free reusable apps already pluggable into
one’s project.
 Compatible with all the main databases.
 Compatible with all the JS and CSS Frameworks.
Why Django ?
 Developer Point Of View
 Use and learn a new language: Python.
 DB Management and ORM built-in.
 Rich documentation.
 Active community.
 Modular architecture.
 DRY Principle (Don’t Repeat Yourself).
 MVC Pattern reinterpreted in MTV.
Why DJAngo ?
 Questions?
What is Django ?
 Python is an interpreted, interactive, object-oriented
programming language.
 Platform indipendent.
 Combines remarkable power with very clear syntax.
 Very rich community and many libraries and frameworks.
 It’s free and open source.
What is python ?
 Open google and search for: most used programming
languages 2014
Who use Python?
Syntax:
 No “;” and “{ }”
 Blocks starts with “:” and are identified by Indentation
 No statically typed. You don’t need to declare any variable
 You can mix object-oriented and imperative programming.
What is python ?
What is python ?
What is python ?
 List:
 Declared using “[ ]”
 Access using index
 Mutable
 Tuple:
 Declared using “( )”
 Access using index
 Immutable
 Dictionary:
 Declared using “ { } “
 Access using keyword
Data Structure:
What is python ?
 Easy to install:
 Download and Install Python:
https://www.python.org/downloads/
 Install pip ( https://bootstrap.pypa.io/get-pip.py ):
 Install Django
Django’s Capabilities
python get-pip.py
pip install django
› Don’t worry there is an IDE that can do these dirties things for you:
› Or you can use Eclipse with pyDev (http://pydev.org/ )
› Ready to use:
 To start a new project just type in a cmd:
 Then starts a new app with:
Django’s Capabilities
django-admin.py startproject mysite
python manage.py startapp polls
 Let’s look at the structure the commands have created:
Django’s Capabilities
Project root
Project package
App package
Project
configurations
files
Application files
All in one:
› With these two commands we have:
 Created the project structure
 Installed the ORM
 Installed a development server
 Installed and configured an SQLite database
 Installed the admin interface
 Installed a ready to use unit-test environement
Django’s Capabilities
– Create the database tables based on the models found in the installed apps.
– Create the database for the authentication system included in django
– Create a superuser account for the authentication system
– Set up a system for propagating change makes to the models into the database
schema
python manage.py migrate
 Modularity:
 You can take existing Python packages or Django apps and compose
them into your own web project. You only need to write the parts that
make your project unique.
 Built-in reusable apps:
 django.contrib.admin – The admin site.
 django.contrib.auth – An authentication system.
 django.contrib.contenttypes – A framework for content types.
 django.contrib.sessions – A session framework.
 django.contrib.messages – A messaging framework.
 django.contrib.staticfiles – A framework for managing static files.
Django’s Capabilities
 Third party reusable apps:
 Django REST framework is a framework to build REST APIs.
 Celery is the standard to manage asynchronous, distributed job queues.
 Django mailer provides a backend for sending email
 django-allauth allows for both local and social authentication
 django-grappelli A jazzy skin for the Django Admin-Interface
 django-tables2 An app for creating HTML tables
 django-dajax Easy to use library to create asynchronous presentation logic with django
 And much more….
Django’s Capabilities
› All these apps can be installed simply typing:
pip install <app_name>
 How to write reusable apps:
 The app we have just created is already reusable!
 Just copy and paste it to another project and link it in the settings.py
 Of course there is a more complete way to package an app:
 https://docs.djangoproject.com/en/1.7/intro/reusable-
apps/#packaging-your-app
 How to find more apps:
 Check https://www.djangopackages.com/ a directory of reusable
apps, sites, tools, and more for your Django projects
 Ask to the community:
https://groups.google.com/forum/#!forum/django-it
 Try to search them: www.google.com
Django’s Capabilities
DRY (Don’t Repeat Yourself)
The DRY principal was one of the fundamental
concepts that Django was designed around.
The DRY principal is all about keeping code simple and
non repeating. This allows developers to reuse code
they wrote for one project in another project.
To help developers adhere to the DRY principle,
Django forces users to use the MVC by initially creating
a standard project structure.
Django’s Capabilities
A different interpretation of the MVC:
MTV: Model View Template
In django interpretation of MVC, the “view” describes the
data that gets presented to the user. It’s not
necessarily how the data looks, but which data is presented.
The view describes which data you see, not how you see it.
Furthermore, it’s sensible to separate content from
presentation – which is where templates come in. In Django,
a “view” describes which data is presented, but a view
normally delegates to a template, which describes how the
data is presented.
Django’s Capabilities
Django Framework Overview forNon-Python Developers
 Deployment Strategies:
 In the cloud:
 Heroku
 Google Appengine
 On a remote machine:
 NGINX + uWSGI or Gunicorn
 Apache + mod_wsgi
Django’s Capabilities
 Official site: https://www.djangoproject.com/
 Official google groups:
https://groups.google.com/forum/#!forum/django-users
 Italian community: https://groups.google.com/forum/#!forum/django-it
 Snippets of reusable code: https://djangosnippets.org/
 Collection of useful links: http://www.fullstackpython.com/django.html
Useful links
› Learning sites:
– https://docs.djangoproject.com/en/1.7/intro/
– http://www.tangowithdjango.com/
– http://tutorial.djangogirls.org/en/index.html
– http://effectivedjango.com/tutorial/
– http://www.djangobook.com/en/2.0/index.html
– http://stacktrace.it/site_media/luambo/uploads/2009/09/14/Copia_visione_Django.pdf
 Questions?
Thanks.

More Related Content

What's hot (20)

Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
Zhe Li
 
Introduction to Django Rest Framework
Introduction to Django Rest FrameworkIntroduction to Django Rest Framework
Introduction to Django Rest Framework
bangaloredjangousergroup
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
Wade Austin
 
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Edureka!
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
Dmitry Buzdin
 
django
djangodjango
django
Mohamed Essam
 
Basic Python Django
Basic Python DjangoBasic Python Django
Basic Python Django
Kaleem Ullah Mangrio
 
Python/Django Training
Python/Django TrainingPython/Django Training
Python/Django Training
University of Technology
 
Don't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using MocksDon't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using Mocks
Victor Rentea
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
Edureka!
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?
Tom Brander
 
Django by rj
Django by rjDjango by rj
Django by rj
Shree M.L.Kakadiya MCA mahila college, Amreli
 
Generics in java
Generics in javaGenerics in java
Generics in java
suraj pandey
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
Joshua Long
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
Nir Kaufman
 
Angular 9
Angular 9 Angular 9
Angular 9
Raja Vishnu
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
07.pallav
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
之宇 趙
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
Zhe Li
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
Wade Austin
 
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Python Projects For Beginners | Python Projects Examples | Python Tutorial | ...
Edureka!
 
Don't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using MocksDon't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using Mocks
Victor Rentea
 
Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...Python Django tutorial | Getting Started With Django | Web Development With D...
Python Django tutorial | Getting Started With Django | Web Development With D...
Edureka!
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Django, What is it, Why is it cool?
Django, What is it, Why is it cool?Django, What is it, Why is it cool?
Django, What is it, Why is it cool?
Tom Brander
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
Joshua Long
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
Nir Kaufman
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
07.pallav
 

Viewers also liked (9)

Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application Structure
SEONGTAEK OH
 
Django - basics
Django - basicsDjango - basics
Django - basics
University of Technology
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
Ricardo Soares
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
Linuxmalaysia Malaysia
 
Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django framework
flapiello
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play Nice
Alex Gaynor
 
Why Django for Web Development
Why Django for Web DevelopmentWhy Django for Web Development
Why Django for Web Development
Morteza Zohoori Shoar
 
Desenvolvimento web simples com Python e DJango
Desenvolvimento web simples com Python e DJangoDesenvolvimento web simples com Python e DJango
Desenvolvimento web simples com Python e DJango
Rafael Nunes
 
Python e Django na Globo.com
Python e Django na Globo.comPython e Django na Globo.com
Python e Django na Globo.com
ricobl
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application Structure
SEONGTAEK OH
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
Ricardo Soares
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
Linuxmalaysia Malaysia
 
Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django framework
flapiello
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play Nice
Alex Gaynor
 
Desenvolvimento web simples com Python e DJango
Desenvolvimento web simples com Python e DJangoDesenvolvimento web simples com Python e DJango
Desenvolvimento web simples com Python e DJango
Rafael Nunes
 
Python e Django na Globo.com
Python e Django na Globo.comPython e Django na Globo.com
Python e Django na Globo.com
ricobl
 
Ad

Similar to Django Framework Overview forNon-Python Developers (20)

Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1
To Sum It Up
 
Introduction and features to Django.pptx
Introduction and features to Django.pptxIntroduction and features to Django.pptx
Introduction and features to Django.pptx
MohamedAhmed686097
 
Django
DjangoDjango
Django
sisibeibei
 
Unleash-the-power-of-Django.pptx
Unleash-the-power-of-Django.pptxUnleash-the-power-of-Django.pptx
Unleash-the-power-of-Django.pptx
ShivamSv1
 
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdfDjango Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
SudhanshiBakre1
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Introduction to DJANGO, a creative framework
Introduction to DJANGO, a creative frameworkIntroduction to DJANGO, a creative framework
Introduction to DJANGO, a creative framework
bunnybro2953
 
Step-by-Step Django Web Development with Python
Step-by-Step Django Web Development with PythonStep-by-Step Django Web Development with Python
Step-by-Step Django Web Development with Python
Shiv Technolabs Pvt. Ltd.
 
Why Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdfWhy Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdf
Mindfire LLC
 
Django Documentation
Django DocumentationDjango Documentation
Django Documentation
Ying wei (Joe) Chou
 
Django Introdcution
Django IntrodcutionDjango Introdcution
Django Introdcution
Nagi Annapureddy
 
Django in Action (MEAP V01) Christopher Trudeau
Django in Action (MEAP V01) Christopher TrudeauDjango in Action (MEAP V01) Christopher Trudeau
Django in Action (MEAP V01) Christopher Trudeau
golemtillo
 
Django Framework Interview Question and Answer partOne.pptx
Django Framework Interview Question and Answer partOne.pptxDjango Framework Interview Question and Answer partOne.pptx
Django Framework Interview Question and Answer partOne.pptx
Md. Naimur Rahman
 
Introduction to Django Course For Newbie - Advance
Introduction to Django Course For Newbie - AdvanceIntroduction to Django Course For Newbie - Advance
Introduction to Django Course For Newbie - Advance
yusufvabdullah001
 
Tango with django
Tango with djangoTango with django
Tango with django
Rajan Kumar Upadhyay
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
radhianiedjan1
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Vlad Voskoboynik
 
Web development django.pdf
Web development django.pdfWeb development django.pdf
Web development django.pdf
KomalSaini178773
 
1-_Introduction_To_Django_Model_and_Database (1).pptx
1-_Introduction_To_Django_Model_and_Database (1).pptx1-_Introduction_To_Django_Model_and_Database (1).pptx
1-_Introduction_To_Django_Model_and_Database (1).pptx
TamilGamers4
 
Python & Django
Python & DjangoPython & Django
Python & Django
Allan114858
 
Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1Django Framework Interview Guide - Part 1
Django Framework Interview Guide - Part 1
To Sum It Up
 
Introduction and features to Django.pptx
Introduction and features to Django.pptxIntroduction and features to Django.pptx
Introduction and features to Django.pptx
MohamedAhmed686097
 
Unleash-the-power-of-Django.pptx
Unleash-the-power-of-Django.pptxUnleash-the-power-of-Django.pptx
Unleash-the-power-of-Django.pptx
ShivamSv1
 
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdfDjango Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
Django Tutorial_ Let’s take a deep dive into Django’s web framework.pdf
SudhanshiBakre1
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
Andolasoft Inc
 
Introduction to DJANGO, a creative framework
Introduction to DJANGO, a creative frameworkIntroduction to DJANGO, a creative framework
Introduction to DJANGO, a creative framework
bunnybro2953
 
Step-by-Step Django Web Development with Python
Step-by-Step Django Web Development with PythonStep-by-Step Django Web Development with Python
Step-by-Step Django Web Development with Python
Shiv Technolabs Pvt. Ltd.
 
Why Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdfWhy Django is The Go-To Framework For Python.pdf
Why Django is The Go-To Framework For Python.pdf
Mindfire LLC
 
Django in Action (MEAP V01) Christopher Trudeau
Django in Action (MEAP V01) Christopher TrudeauDjango in Action (MEAP V01) Christopher Trudeau
Django in Action (MEAP V01) Christopher Trudeau
golemtillo
 
Django Framework Interview Question and Answer partOne.pptx
Django Framework Interview Question and Answer partOne.pptxDjango Framework Interview Question and Answer partOne.pptx
Django Framework Interview Question and Answer partOne.pptx
Md. Naimur Rahman
 
Introduction to Django Course For Newbie - Advance
Introduction to Django Course For Newbie - AdvanceIntroduction to Django Course For Newbie - Advance
Introduction to Django Course For Newbie - Advance
yusufvabdullah001
 
0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf0506-django-web-framework-for-python.pdf
0506-django-web-framework-for-python.pdf
radhianiedjan1
 
Web development django.pdf
Web development django.pdfWeb development django.pdf
Web development django.pdf
KomalSaini178773
 
1-_Introduction_To_Django_Model_and_Database (1).pptx
1-_Introduction_To_Django_Model_and_Database (1).pptx1-_Introduction_To_Django_Model_and_Database (1).pptx
1-_Introduction_To_Django_Model_and_Database (1).pptx
TamilGamers4
 
Ad

Recently uploaded (20)

Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
The case for on-premises AI
The case for on-premises AIThe case for on-premises AI
The case for on-premises AI
Principled Technologies
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
Fortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in CybersecurityFortinet Certified Associate in Cybersecurity
Fortinet Certified Associate in Cybersecurity
VICTOR MAESTRE RAMIREZ
 
LSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection FunctionLSNIF: Locally-Subdivided Neural Intersection Function
LSNIF: Locally-Subdivided Neural Intersection Function
Takahiro Harada
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
Improving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevExImproving Developer Productivity With DORA, SPACE, and DevEx
Improving Developer Productivity With DORA, SPACE, and DevEx
Justin Reock
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 

Django Framework Overview forNon-Python Developers

  • 1. Django Framework The web framework for perfectionists with deadlines Rosario Renga [email protected]
  • 2. 1. What is Django 2. What is Python 3. Django’s Capabilities a. All-in-One and Ready to Use b. Modularity c. Pattern: MTV and DRY d. Deployment strategies 4. Useful Links Summary
  • 3. › Django is a high-level Python Web framework. › Rapid development and clean, pragmatic design. › Focus on writing your app without needing to reinvent the wheel. › It’s free and open source. From https://www.djangoproject.com/ What is Django ?
  • 4.  Instagram: http://instagram.com/  Pinterest: https://www.pinterest.com/  The Washington Post:http://www.washingtonpost.com/  Mozilla’s blog: http://blog.mozilla.org/webdev/  My blog!  http://blog.itsmurfs.it/ Who use Django ?
  • 5.  Enterprise Point Of View  Free and Open-source.  Thousand of free reusable apps already pluggable into one’s project.  Compatible with all the main databases.  Compatible with all the JS and CSS Frameworks. Why Django ?
  • 6.  Developer Point Of View  Use and learn a new language: Python.  DB Management and ORM built-in.  Rich documentation.  Active community.  Modular architecture.  DRY Principle (Don’t Repeat Yourself).  MVC Pattern reinterpreted in MTV. Why DJAngo ?
  • 8.  Python is an interpreted, interactive, object-oriented programming language.  Platform indipendent.  Combines remarkable power with very clear syntax.  Very rich community and many libraries and frameworks.  It’s free and open source. What is python ?
  • 9.  Open google and search for: most used programming languages 2014 Who use Python?
  • 10. Syntax:  No “;” and “{ }”  Blocks starts with “:” and are identified by Indentation  No statically typed. You don’t need to declare any variable  You can mix object-oriented and imperative programming. What is python ?
  • 13.  List:  Declared using “[ ]”  Access using index  Mutable  Tuple:  Declared using “( )”  Access using index  Immutable  Dictionary:  Declared using “ { } “  Access using keyword Data Structure: What is python ?
  • 14.  Easy to install:  Download and Install Python: https://www.python.org/downloads/  Install pip ( https://bootstrap.pypa.io/get-pip.py ):  Install Django Django’s Capabilities python get-pip.py pip install django
  • 15. › Don’t worry there is an IDE that can do these dirties things for you: › Or you can use Eclipse with pyDev (http://pydev.org/ ) › Ready to use:  To start a new project just type in a cmd:  Then starts a new app with: Django’s Capabilities django-admin.py startproject mysite python manage.py startapp polls
  • 16.  Let’s look at the structure the commands have created: Django’s Capabilities Project root Project package App package Project configurations files Application files
  • 17. All in one: › With these two commands we have:  Created the project structure  Installed the ORM  Installed a development server  Installed and configured an SQLite database  Installed the admin interface  Installed a ready to use unit-test environement Django’s Capabilities – Create the database tables based on the models found in the installed apps. – Create the database for the authentication system included in django – Create a superuser account for the authentication system – Set up a system for propagating change makes to the models into the database schema python manage.py migrate
  • 18.  Modularity:  You can take existing Python packages or Django apps and compose them into your own web project. You only need to write the parts that make your project unique.  Built-in reusable apps:  django.contrib.admin – The admin site.  django.contrib.auth – An authentication system.  django.contrib.contenttypes – A framework for content types.  django.contrib.sessions – A session framework.  django.contrib.messages – A messaging framework.  django.contrib.staticfiles – A framework for managing static files. Django’s Capabilities
  • 19.  Third party reusable apps:  Django REST framework is a framework to build REST APIs.  Celery is the standard to manage asynchronous, distributed job queues.  Django mailer provides a backend for sending email  django-allauth allows for both local and social authentication  django-grappelli A jazzy skin for the Django Admin-Interface  django-tables2 An app for creating HTML tables  django-dajax Easy to use library to create asynchronous presentation logic with django  And much more…. Django’s Capabilities › All these apps can be installed simply typing: pip install <app_name>
  • 20.  How to write reusable apps:  The app we have just created is already reusable!  Just copy and paste it to another project and link it in the settings.py  Of course there is a more complete way to package an app:  https://docs.djangoproject.com/en/1.7/intro/reusable- apps/#packaging-your-app  How to find more apps:  Check https://www.djangopackages.com/ a directory of reusable apps, sites, tools, and more for your Django projects  Ask to the community: https://groups.google.com/forum/#!forum/django-it  Try to search them: www.google.com Django’s Capabilities
  • 21. DRY (Don’t Repeat Yourself) The DRY principal was one of the fundamental concepts that Django was designed around. The DRY principal is all about keeping code simple and non repeating. This allows developers to reuse code they wrote for one project in another project. To help developers adhere to the DRY principle, Django forces users to use the MVC by initially creating a standard project structure. Django’s Capabilities
  • 22. A different interpretation of the MVC: MTV: Model View Template In django interpretation of MVC, the “view” describes the data that gets presented to the user. It’s not necessarily how the data looks, but which data is presented. The view describes which data you see, not how you see it. Furthermore, it’s sensible to separate content from presentation – which is where templates come in. In Django, a “view” describes which data is presented, but a view normally delegates to a template, which describes how the data is presented. Django’s Capabilities
  • 24.  Deployment Strategies:  In the cloud:  Heroku  Google Appengine  On a remote machine:  NGINX + uWSGI or Gunicorn  Apache + mod_wsgi Django’s Capabilities
  • 25.  Official site: https://www.djangoproject.com/  Official google groups: https://groups.google.com/forum/#!forum/django-users  Italian community: https://groups.google.com/forum/#!forum/django-it  Snippets of reusable code: https://djangosnippets.org/  Collection of useful links: http://www.fullstackpython.com/django.html Useful links › Learning sites: – https://docs.djangoproject.com/en/1.7/intro/ – http://www.tangowithdjango.com/ – http://tutorial.djangogirls.org/en/index.html – http://effectivedjango.com/tutorial/ – http://www.djangobook.com/en/2.0/index.html – http://stacktrace.it/site_media/luambo/uploads/2009/09/14/Copia_visione_Django.pdf