SlideShare a Scribd company logo
1 of 24
Download to read offline
DEVELOPING SOFTWARE USING
PYTHON AND DJANGO TO
SOLVE REAL LIFE PROBLEMS
ANNA MAKARUDZE
PYCON NAMIBIA 2016 WORKSHOP
29 JANUARY 2016
WORKSHOP STRUCTURE
Background
Objectives
Problem Identification
Proposed Solution
System Design
System Implementation
Conclusion
BACKGROUND
MANY PROGRAMMERS NEW TO PYTHON ASK
THEMSELVES THESE QUESTIONS, SOON AFTER
LEARNING THE LANGUAGE: “NOW THAT I HAVE
LEARNT PROGRAMMING WITH PYTHON, HOW CAN I
USE IT? WHAT SOFTWARE PROGRAMS CAN I
DEVELOP WITH IT?”
OBJECTIVES OF WORKSHOP
BY THE END OF THIS WORKSHOP, PARTICIPANTS SHOULD BE
ABLE TO:
• IDENTIFY PROBLEMS AROUND THEM THAT CAN BE
COMPUTERISED
• PROPOSE A SYSTEM/SOLUTION TO ADDRESS THE PROBLEM
• DESIGN POSSIBLE SOLUTIONS TO ADDRESS THE PROBLEM
• USE PYTHON AND DJANGO TO DEVELOP
SOFTWARE/SOLUTION
PROBLEM IDENTIFICATION
• IDENTIFY THE PROBLEM BY LOOKING AROUND YOU
• HOW IS THIS DONE?
• IS THIS THE BEST (MOST EFFICIENT) WAY TO DO THIS?
• WHAT IF WE CHANGED HERE OR THERE?
• SOFTWARE IDEAS/SYSTEMS DO NOT START FROM FICTION
MOVIES, THEY EMERGE FROM REAL LIFE, DAY-TO-DAY
PROBLEMS!
ACTIVITY 1 – PROBLEM DEFINITION
IDENTIFY A PROBLEM THAT AFFECTS YOU IN YOUR
DAY-TO-DAY LIFE. IT MAY BE AS A RESULT OF A LACK
OF AN AUTOMATED SYSTEM, INEFFICIENT SYSTEM OR
POORLY DEFINED PROCESSES. THE PROBLEM SHOULD
BE SOLVABLE OR THERE SHOULD BE ROOM FOR
IMPROVEMENT BY AUTOMATION.
PROPOSED SOLUTION
• ANALYSE THE PROBLEM
• CAN THE PROBLEM BE SOLVED?
• HOW CAN WE SOLVE THIS PROBLEM OR IMPROVE THE
SITUATION?
• WHAT ARE THE ALTERNATIVES AVAILABLE?
• WHAT RESOURCES DO WE HAVE TO SOLVE THIS
PROBLEM?
ACTIVITY 2 – PROPOSED SOLUTION
PROPOSE A SOLUTION/SYSTEM THAT CAN BE USED
TO ADDRESS THE PROBLEM THAT YOU JUST
IDENTIFIED IN ACTIVITY 1. YOU CAN PROPOSE TWO
OR THREE DIFFERENT SOLUTIONS TO THE PROBLEM
AND CHOOSE THE ONE YOU THINK SOLVES THE
PROBLEM BEST OR IS FEASIBLE AT THIS STAGE.
SYSTEM DESIGN
• COVERS THE FUNCTIONALITY THE SOLUTION WILL HAVE
• WILL IT BE DATABASE-DRIVEN?
• WHICH DATABASE SYSTEM WILL IT USE?
• HOW WILL THE DATABASE TABLES BE STRUCTURED?
• HOW WILL USER INPUT BE CAPTURED?
• MENUS, USER INTERFACE, SECURITY, USER FEEDBACK,
PROCESSES/PROCEDURES, ETC.
ACTIVITY 3 – SYSTEM DESIGN
DESIGN THE SYSTEM YOU JUST PROPOSED IN ACTIVITY 2.
DESIGN THE DATABASE (IF REQUIRED), WEB PAGES
REQUIRED, FORMS REQUIRED, ETC. FOR THE SYSTEM TO BE
ABLE TO MEET USER REQUIREMENTS. LIST AND DEFINE ALL
THE TASKS TO BE PERFORMED BY YOUR APPLICATION. FOR
EACH TASK, WRITE AN ALGORITHM/PSEUDOCODE TO
SHOW STEPS TO BE FOLLOWED TO ACCOMPLISH THE TASK.
SYSTEM IMPLEMENTATION
• DEVELOP THE SYSTEM IN THE CHOSEN DEVELOPMENT
ENVIRONMENT
• MAY RESULT IN CHANGES TO THE INITIAL DESIGN WITH
RESPECT TO DATABASE, MENUS, USER INTERFACE, USER
FEEDBACK, PROCEDURES ETC.
• MAKE ADJUSTMENTS AS NECESSARY, ENSURING THE
REQUIRED OUTCOME IS ACHIEVED.
ACTIVITY 4 – SYSTEM IMPLEMENTATION
SET UP YOUR APPLICATION IN THE IDE OF YOUR
CHOICE. INSTALL DJANGO AND OTHER PACKAGES
REQUIRED BY YOUR APPLICATION. DEVELOP AND TEST
THE SYSTEM. (THE WORKSHOP ASSUMES YOU HAVE
PYTHON INSTALLED ALREADY!)
SETTING UP OUR DJANGO APPLICATION
CREATE AND ACTIVATE A VIRTUALENV
• OPEN COMMAND PROMPT
• TYPE IN THE FOLLOWING COMMANDS
virtualenv env
source env/bin/activate
env/Scripts/activate (for Windows users)
SETTING UP OUR DJANGO APPLICATION
• INSTALL DJANGO IN THE VIRTUALENV
pip install django
• CREATE A NEW DIRECTORY FOR THE PROJECT
mkdir myproject
• CD INTO THE NEW DIRECTORY
cd myproject
SETTING UP OUR DJANGO APPLICATION
• CREATE A NEW DJANGO PROJECT IN THE FOLDER
django-admin startproject myproject
• RESULT :
myproject/
manage.py
myproject/
__init__.py
urls.py
settings.py
wsgi.py
SETTING UP OUR DJANGO APPLICATION
• RUN
python manage.py migrate
• RUN
python manage.py runserver
• IN YOUR BROWSER, TYPE http://127.0.0.1:8000
SETTING UP OUR DJANGO APPLICATION
• CREATE YOUR APP
python manage.py startapp app
• RESULT:
app/
migrations/
__init__.py
admin.py
apps.py
models.py
tests.py
views.py
SETTING UP OUR DJANGO APPLICATION
• EDIT YOUR __init__.py
• ADD THE FOLLOWING:
"""
Package for app.
"""
default_app_config = ‘app.apps.MyProjectConfig'
SETTING UP OUR DJANGO APPLICATION
• ADD YOUR APP TO INSTALLED APPS IN YOUR settings.py
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
…
'app',
)
DEVELOPING OUR DJANGO APPLICATION
• FILES TO BE WORKED ON:
models.py – create our models here
admin.py – register our models here
views.py – write our views here
urls.py – register the urls for our views here
• NEW FOLDERS TO BE CREATED
templates – create our HTML files/templates here
static – create our CSS files here for styling our pages
DEVELOPING OUR DJANGO APPLICATION
• HTML TEMPLATES REQUIRED:
•BASE/LAYOUT
•INDEX
•AND ANY OTHER PAGES REQUIRED BY YOUR APP
CONCLUSION
• PYTHON/DJANGO CAN BE USED TO DEVELOP
SOFTWARE TO SOLVE REAL LIFE PROBLEMS JUST LIKE
ANY OTHER PROGRAMMING LANGUAGE.
• THE TASK IS UP TO YOU, THE PROGRAMMER TO
DECIDE HOW YOU CAN USE THEM!
Questions
Answers
Progress
END OF PRESENTATION
THANK YOU!
TATENDA!
MUITO OBRIGADO!

More Related Content

What's hot

Software Project Management ppt
Software Project Management pptSoftware Project Management ppt
Software Project Management ppt
Andreea Usatenco
 
Load Balancing In Cloud Computing newppt
Load Balancing In Cloud Computing newpptLoad Balancing In Cloud Computing newppt
Load Balancing In Cloud Computing newppt
Utshab Saha
 

What's hot (20)

Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Dynamic modeling
Dynamic modelingDynamic modeling
Dynamic modeling
 
AWS PPT.pptx
AWS PPT.pptxAWS PPT.pptx
AWS PPT.pptx
 
Windows Azure Datasheet
Windows Azure DatasheetWindows Azure Datasheet
Windows Azure Datasheet
 
Overview of computing paradigm
Overview of computing paradigmOverview of computing paradigm
Overview of computing paradigm
 
Anatomy of An Open Source Project: Key Factors to Success
Anatomy of An Open Source Project: Key Factors to SuccessAnatomy of An Open Source Project: Key Factors to Success
Anatomy of An Open Source Project: Key Factors to Success
 
Streaming data for real time analysis
Streaming data for real time analysisStreaming data for real time analysis
Streaming data for real time analysis
 
Software Project Management ppt
Software Project Management pptSoftware Project Management ppt
Software Project Management ppt
 
Software development methodologies
Software development methodologiesSoftware development methodologies
Software development methodologies
 
A gentle introduction to algorithm complexity analysis
A gentle introduction to algorithm complexity analysisA gentle introduction to algorithm complexity analysis
A gentle introduction to algorithm complexity analysis
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Netflix API - Presentation to PayPal
Netflix API - Presentation to PayPalNetflix API - Presentation to PayPal
Netflix API - Presentation to PayPal
 
Load Balancing In Cloud Computing newppt
Load Balancing In Cloud Computing newpptLoad Balancing In Cloud Computing newppt
Load Balancing In Cloud Computing newppt
 
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
 
Java garbage collection & GC friendly coding
Java garbage collection  & GC friendly codingJava garbage collection  & GC friendly coding
Java garbage collection & GC friendly coding
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Mediawiki to Confluence migration
Mediawiki to Confluence migrationMediawiki to Confluence migration
Mediawiki to Confluence migration
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
 

Viewers also liked

EYC- Meet Mary
EYC- Meet MaryEYC- Meet Mary
EYC- Meet Mary
eyclaw
 
Hobbies and interests of industrial students in ust
Hobbies and interests of industrial students in ustHobbies and interests of industrial students in ust
Hobbies and interests of industrial students in ust
Sarah Gonzales
 
Hamel hasselbach weil_krumm
Hamel hasselbach weil_krummHamel hasselbach weil_krumm
Hamel hasselbach weil_krumm
euvt
 
India forbes
India forbesIndia forbes
India forbes
pkcbose
 

Viewers also liked (20)

Mastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsMastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operations
 
SQL 101 for business experts and stakeholders
SQL 101 for business experts and stakeholdersSQL 101 for business experts and stakeholders
SQL 101 for business experts and stakeholders
 
Complex queries in sql
Complex queries in sqlComplex queries in sql
Complex queries in sql
 
Проросійські виступи на сході і півдні України
Проросійські виступи на сході і півдні УкраїниПроросійські виступи на сході і півдні України
Проросійські виступи на сході і півдні України
 
EYC- Meet Mary
EYC- Meet MaryEYC- Meet Mary
EYC- Meet Mary
 
Saertex Imagebroschuere 0909
Saertex Imagebroschuere 0909Saertex Imagebroschuere 0909
Saertex Imagebroschuere 0909
 
Hobbies and interests of industrial students in ust
Hobbies and interests of industrial students in ustHobbies and interests of industrial students in ust
Hobbies and interests of industrial students in ust
 
About learning to program
About learning to programAbout learning to program
About learning to program
 
Clothes
ClothesClothes
Clothes
 
Nmdl final pp
Nmdl final ppNmdl final pp
Nmdl final pp
 
Astrologie cu poze
Astrologie cu pozeAstrologie cu poze
Astrologie cu poze
 
Webquest
WebquestWebquest
Webquest
 
Brochure sellin gppt 2
Brochure sellin gppt 2Brochure sellin gppt 2
Brochure sellin gppt 2
 
Background Veil Lecture
Background Veil LectureBackground Veil Lecture
Background Veil Lecture
 
презентация Microsoft office power point
презентация Microsoft office power pointпрезентация Microsoft office power point
презентация Microsoft office power point
 
Hamel hasselbach weil_krumm
Hamel hasselbach weil_krummHamel hasselbach weil_krumm
Hamel hasselbach weil_krumm
 
1234
12341234
1234
 
Clothes
ClothesClothes
Clothes
 
India forbes
India forbesIndia forbes
India forbes
 
Techtextil India Symposium Brochure 2012
Techtextil India Symposium Brochure 2012Techtextil India Symposium Brochure 2012
Techtextil India Symposium Brochure 2012
 

Similar to Developing Software using Python and Django to solve real life problems

The Testing Planet Issue 4
The Testing Planet Issue 4The Testing Planet Issue 4
The Testing Planet Issue 4
Rosie Sherry
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
sdjdskjd9097
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
Udi Bauman
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
ccis224477
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
cis247
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
sdjdskjd9097
 
82_PHOTOLAB-----Project PPT.pdfhejeenejsn
82_PHOTOLAB-----Project PPT.pdfhejeenejsn82_PHOTOLAB-----Project PPT.pdfhejeenejsn
82_PHOTOLAB-----Project PPT.pdfhejeenejsn
shivam003d
 

Similar to Developing Software using Python and Django to solve real life problems (20)

Konsep Aplikasi Komputer
Konsep Aplikasi KomputerKonsep Aplikasi Komputer
Konsep Aplikasi Komputer
 
konsep aplikasi komputer
konsep aplikasi komputerkonsep aplikasi komputer
konsep aplikasi komputer
 
Getting Started with MEAN Stack
Getting Started with MEAN StackGetting Started with MEAN Stack
Getting Started with MEAN Stack
 
The Testing Planet Issue 4
The Testing Planet Issue 4The Testing Planet Issue 4
The Testing Planet Issue 4
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
 
Getting It Done
Getting It DoneGetting It Done
Getting It Done
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
Java By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu ManepalliJava By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu Manepalli
 
Java By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu ManepalliJava By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu Manepalli
 
Learn Fast to Build Fast @ le Monde - Lean Kanban France 2014
Learn Fast to Build Fast @ le Monde - Lean Kanban France 2014Learn Fast to Build Fast @ le Monde - Lean Kanban France 2014
Learn Fast to Build Fast @ le Monde - Lean Kanban France 2014
 
Lessons learned maintaining Open Source ActionScript projects
Lessons learned maintaining Open Source ActionScript projectsLessons learned maintaining Open Source ActionScript projects
Lessons learned maintaining Open Source ActionScript projects
 
Flexible design systems by Charlie Robbins
Flexible design systems by Charlie RobbinsFlexible design systems by Charlie Robbins
Flexible design systems by Charlie Robbins
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
 
Extreme programming (xp) | David Tzemach
Extreme programming (xp) | David TzemachExtreme programming (xp) | David Tzemach
Extreme programming (xp) | David Tzemach
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
82_PHOTOLAB-----Project PPT.pdfhejeenejsn
82_PHOTOLAB-----Project PPT.pdfhejeenejsn82_PHOTOLAB-----Project PPT.pdfhejeenejsn
82_PHOTOLAB-----Project PPT.pdfhejeenejsn
 
2010-03 Yesterday's Trusted Web Sites are Today's Malicious Servers
2010-03 Yesterday's Trusted Web Sites are Today's Malicious Servers2010-03 Yesterday's Trusted Web Sites are Today's Malicious Servers
2010-03 Yesterday's Trusted Web Sites are Today's Malicious Servers
 
Mobile & Tablet UX | NYU School of Professional Studies | Week 1 (Intro)
Mobile & Tablet UX | NYU School of Professional Studies | Week 1 (Intro)Mobile & Tablet UX | NYU School of Professional Studies | Week 1 (Intro)
Mobile & Tablet UX | NYU School of Professional Studies | Week 1 (Intro)
 

Recently uploaded

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 

Developing Software using Python and Django to solve real life problems

  • 1. DEVELOPING SOFTWARE USING PYTHON AND DJANGO TO SOLVE REAL LIFE PROBLEMS ANNA MAKARUDZE PYCON NAMIBIA 2016 WORKSHOP 29 JANUARY 2016
  • 2. WORKSHOP STRUCTURE Background Objectives Problem Identification Proposed Solution System Design System Implementation Conclusion
  • 3. BACKGROUND MANY PROGRAMMERS NEW TO PYTHON ASK THEMSELVES THESE QUESTIONS, SOON AFTER LEARNING THE LANGUAGE: “NOW THAT I HAVE LEARNT PROGRAMMING WITH PYTHON, HOW CAN I USE IT? WHAT SOFTWARE PROGRAMS CAN I DEVELOP WITH IT?”
  • 4. OBJECTIVES OF WORKSHOP BY THE END OF THIS WORKSHOP, PARTICIPANTS SHOULD BE ABLE TO: • IDENTIFY PROBLEMS AROUND THEM THAT CAN BE COMPUTERISED • PROPOSE A SYSTEM/SOLUTION TO ADDRESS THE PROBLEM • DESIGN POSSIBLE SOLUTIONS TO ADDRESS THE PROBLEM • USE PYTHON AND DJANGO TO DEVELOP SOFTWARE/SOLUTION
  • 5. PROBLEM IDENTIFICATION • IDENTIFY THE PROBLEM BY LOOKING AROUND YOU • HOW IS THIS DONE? • IS THIS THE BEST (MOST EFFICIENT) WAY TO DO THIS? • WHAT IF WE CHANGED HERE OR THERE? • SOFTWARE IDEAS/SYSTEMS DO NOT START FROM FICTION MOVIES, THEY EMERGE FROM REAL LIFE, DAY-TO-DAY PROBLEMS!
  • 6. ACTIVITY 1 – PROBLEM DEFINITION IDENTIFY A PROBLEM THAT AFFECTS YOU IN YOUR DAY-TO-DAY LIFE. IT MAY BE AS A RESULT OF A LACK OF AN AUTOMATED SYSTEM, INEFFICIENT SYSTEM OR POORLY DEFINED PROCESSES. THE PROBLEM SHOULD BE SOLVABLE OR THERE SHOULD BE ROOM FOR IMPROVEMENT BY AUTOMATION.
  • 7. PROPOSED SOLUTION • ANALYSE THE PROBLEM • CAN THE PROBLEM BE SOLVED? • HOW CAN WE SOLVE THIS PROBLEM OR IMPROVE THE SITUATION? • WHAT ARE THE ALTERNATIVES AVAILABLE? • WHAT RESOURCES DO WE HAVE TO SOLVE THIS PROBLEM?
  • 8. ACTIVITY 2 – PROPOSED SOLUTION PROPOSE A SOLUTION/SYSTEM THAT CAN BE USED TO ADDRESS THE PROBLEM THAT YOU JUST IDENTIFIED IN ACTIVITY 1. YOU CAN PROPOSE TWO OR THREE DIFFERENT SOLUTIONS TO THE PROBLEM AND CHOOSE THE ONE YOU THINK SOLVES THE PROBLEM BEST OR IS FEASIBLE AT THIS STAGE.
  • 9. SYSTEM DESIGN • COVERS THE FUNCTIONALITY THE SOLUTION WILL HAVE • WILL IT BE DATABASE-DRIVEN? • WHICH DATABASE SYSTEM WILL IT USE? • HOW WILL THE DATABASE TABLES BE STRUCTURED? • HOW WILL USER INPUT BE CAPTURED? • MENUS, USER INTERFACE, SECURITY, USER FEEDBACK, PROCESSES/PROCEDURES, ETC.
  • 10. ACTIVITY 3 – SYSTEM DESIGN DESIGN THE SYSTEM YOU JUST PROPOSED IN ACTIVITY 2. DESIGN THE DATABASE (IF REQUIRED), WEB PAGES REQUIRED, FORMS REQUIRED, ETC. FOR THE SYSTEM TO BE ABLE TO MEET USER REQUIREMENTS. LIST AND DEFINE ALL THE TASKS TO BE PERFORMED BY YOUR APPLICATION. FOR EACH TASK, WRITE AN ALGORITHM/PSEUDOCODE TO SHOW STEPS TO BE FOLLOWED TO ACCOMPLISH THE TASK.
  • 11. SYSTEM IMPLEMENTATION • DEVELOP THE SYSTEM IN THE CHOSEN DEVELOPMENT ENVIRONMENT • MAY RESULT IN CHANGES TO THE INITIAL DESIGN WITH RESPECT TO DATABASE, MENUS, USER INTERFACE, USER FEEDBACK, PROCEDURES ETC. • MAKE ADJUSTMENTS AS NECESSARY, ENSURING THE REQUIRED OUTCOME IS ACHIEVED.
  • 12. ACTIVITY 4 – SYSTEM IMPLEMENTATION SET UP YOUR APPLICATION IN THE IDE OF YOUR CHOICE. INSTALL DJANGO AND OTHER PACKAGES REQUIRED BY YOUR APPLICATION. DEVELOP AND TEST THE SYSTEM. (THE WORKSHOP ASSUMES YOU HAVE PYTHON INSTALLED ALREADY!)
  • 13. SETTING UP OUR DJANGO APPLICATION CREATE AND ACTIVATE A VIRTUALENV • OPEN COMMAND PROMPT • TYPE IN THE FOLLOWING COMMANDS virtualenv env source env/bin/activate env/Scripts/activate (for Windows users)
  • 14. SETTING UP OUR DJANGO APPLICATION • INSTALL DJANGO IN THE VIRTUALENV pip install django • CREATE A NEW DIRECTORY FOR THE PROJECT mkdir myproject • CD INTO THE NEW DIRECTORY cd myproject
  • 15. SETTING UP OUR DJANGO APPLICATION • CREATE A NEW DJANGO PROJECT IN THE FOLDER django-admin startproject myproject • RESULT : myproject/ manage.py myproject/ __init__.py urls.py settings.py wsgi.py
  • 16. SETTING UP OUR DJANGO APPLICATION • RUN python manage.py migrate • RUN python manage.py runserver • IN YOUR BROWSER, TYPE http://127.0.0.1:8000
  • 17. SETTING UP OUR DJANGO APPLICATION • CREATE YOUR APP python manage.py startapp app • RESULT: app/ migrations/ __init__.py admin.py apps.py models.py tests.py views.py
  • 18. SETTING UP OUR DJANGO APPLICATION • EDIT YOUR __init__.py • ADD THE FOLLOWING: """ Package for app. """ default_app_config = ‘app.apps.MyProjectConfig'
  • 19. SETTING UP OUR DJANGO APPLICATION • ADD YOUR APP TO INSTALLED APPS IN YOUR settings.py # Application definition INSTALLED_APPS = ( 'django.contrib.admin', … 'app', )
  • 20. DEVELOPING OUR DJANGO APPLICATION • FILES TO BE WORKED ON: models.py – create our models here admin.py – register our models here views.py – write our views here urls.py – register the urls for our views here • NEW FOLDERS TO BE CREATED templates – create our HTML files/templates here static – create our CSS files here for styling our pages
  • 21. DEVELOPING OUR DJANGO APPLICATION • HTML TEMPLATES REQUIRED: •BASE/LAYOUT •INDEX •AND ANY OTHER PAGES REQUIRED BY YOUR APP
  • 22. CONCLUSION • PYTHON/DJANGO CAN BE USED TO DEVELOP SOFTWARE TO SOLVE REAL LIFE PROBLEMS JUST LIKE ANY OTHER PROGRAMMING LANGUAGE. • THE TASK IS UP TO YOU, THE PROGRAMMER TO DECIDE HOW YOU CAN USE THEM!
  • 24. END OF PRESENTATION THANK YOU! TATENDA! MUITO OBRIGADO!