SlideShare a Scribd company logo
1 of 78
Download to read offline
Introduction       Using django     Features of django   Reuseable apps   End Notes




               Building Pluggable Web Applications using



                                  Lakshman Prasad

                                    Agiliq Solutions




                                   April 21, 2010
Introduction       Using django     Features of django   Reuseable apps   End Notes




           • For building database driven web applications
Introduction       Using django     Features of django   Reuseable apps   End Notes




           • For building database driven web applications
           • Emphasis on Reuse, DRY and simplicity
Introduction   Using django    Features of django   Reuseable apps   End Notes




                        Hypothetical Application
Introduction       Using django       Features of django   Reuseable apps   End Notes




               Install a pluggable app django-star-rating


       $pip install django-star-rating

       INSTALLED APPS = (
           ’ django . c o n t r i b   . auth ’ ,
           ’ django . c o n t r i b   . contenttypes ’ ,
           ’ django . c o n t r i b   . sessions ’ ,
           ’ django . c o n t r i b   . sites ’ ,
           ’ django . c o n t r i b   . admin ’ ,
           ’ starrating ’ ,
       )
Introduction         Using django        Features of django       Reuseable apps   End Notes




                                Point to an url pattern



       from b l o g . m o d e l s import P o s t

       urlpatterns = patterns ( ’ ’ ,
           ( r ’ ˆ$ ’ , ’ b l o g . v i e w s . i n d e x ’ ) ,
           ( r ’ s t a r i n g /$ ’ , { model : P o s t } ,
           ’ s t a r r a t i n g . views . star ’ ) ,
       )
Introduction      Using django     Features of django   Reuseable apps   End Notes




                    Put the rating where you want!

      <html>
          <head>
              < t i t l e>{{ page . t i t l e }}</ t i t l e>
          <body>
              {% s t a r r a t i n g %}
              <d i v>
                      {{ page . c o n t e n t }}
              </ d i v>
          ...
          </body>
      ...
Introduction   Using django   Features of django   Reuseable apps   End Notes




                              Thats it!
Introduction      Using django   Features of django   Reuseable apps   End Notes




       Introduction
           Definition
           A Case Study: Youtube Stars
           Overview
           Philosophy
       Using django
          MTV
       Features of django
          Features
       Reuseable apps
          Writing reuseable apps
          Community Applications
       End Notes
          Django Stats
          Common Enterprise Hurdles
          Other
Introduction    Using django   Features of django   Reuseable apps   End Notes




               Developed at Lawrence-Journal World
5 million hits per month
600 Contributors
Majority of the features community contributed
5 years since Open Source
Introduction   Using django    Features of django   Reuseable apps   End Notes




                              Philosophy
Automate repetitive tasks
Make Development Fast
Introduction   Using django   Features of django   Reuseable apps   End Notes




                  Convention Over Configuration
Follow Best Practices
Models-Templates-Views
Models
Introduction           Using django          Features of django       Reuseable apps   End Notes




                                         Model Syntax
       from d j a n g o . db import m o d e l s

       c l a s s P o s t ( m o d e l s . Model ) :
               t i t l e = m o d e l s . C h a r F i e l d ( m a x l e n g t h =100)
               t e x t = models . T e x t F i e l d ( )
               datetime = models . DateTimeField ( )

               c l a s s Meta :
                       o r d e r i n g = ( ’−d a t e t i m e ’ , )

               def      unicode ( self ):
                      return s e l f . t i t l e

       c l a s s Comment ( m o d e l s . Model ) :
               post = models . ForeignKey ( Post )
               t e x t = models . T e x t F i e l d ( )
Introduction        Using django         Features of django      Reuseable apps   End Notes




                                       Model API




      >>>from b l o g . m o d e l s import Post , Comment
      >>>p o s t = P o s t . o b j e c t s . a l l ( ) [ 0 ]
      >>>p o s t c o m m e n t s = p o s t . c om m en t s et . a l l ( )
Introduction   Using django     Features of django   Reuseable apps   End Notes




                          Admin by models alone
Introduction         Using django         Features of django      Reuseable apps   End Notes




                                     Admin Syntax


       from d j a n g o . c o n t r i b import admin
       from m o d e l s import Post , Comment

       c l a s s PostAdmin ( admin . ModelAdmin ) :
               l i s t d i s p l a y = ( ’ t i t l e ’ , ’ datetime ’ )

       c l a s s CommentAdmin ( admin . ModelAdmin ) :
               l i s t d i s p l a y = ( ’ text ’ ,)

       admin . s i t e . r e g i s t e r ( Post , PostAdmin )
       admin . s i t e . r e g i s t e r ( Comment , CommentAdmin )
List Page
Add an Entry
Auto Validation
Introduction          Using django          Features of django        Reuseable apps   End Notes




                                            Ugly urls



       h t t p : / / a r t . com/ a r t g a l l e r y / d e f a u l t . a s p ?
       s i d =9DF4BC0580DF11D3ACB60090271E26A8
       &command= f r e e l i s t

       h t t p : / / p r e v i e w . y n o t . com/ c g i b i n /
       n d C G I 5 0 . c g i / Y n o t P h o e n i x / CFsMain .
Introduction        Using django        Features of django      Reuseable apps       End Notes




                                       Good urls




       h t t p : / /www. w i r e d . com/ a p p l e / MacbookPro /

       h t t p : / / devmarch . com/ d e v e l o p e r s u m m i t / s p e a k e r s . html
Introduction         Using django        Features of django       Reuseable apps   End Notes




                                    django url pattern



       from b l o g . m o d e l s import P o s t

       urlpatterns = patterns ( ’ ’ ,
           ( r ’ ˆ$ ’ , ’ b l o g . v i e w s . i n d e x ’ ) ,
           ( r ’ s t a r i n g /$ ’ , { model : P o s t } ,
           ’ s t a r r a t i n g . views . star ’ ) ,
       )
Views
Introduction         Using django         Features of django       Reuseable apps   End Notes




                                       django views




       from d j a n g o . h t t p import H t t p R e s p o n s e

       def p o s t ( r e q u e s t ) :
           r e t u r n H t t p R e s p o n s e ( ’ H e l l o World ! ’ )
Introduction         Using django         Features of django       Reuseable apps         End Notes




                                       django views

       def p o s t ( r e q u e s t , p o s t i d ) :
           p o s t = P o s t . o b j e c t s . g e t ( pk=p o s t i d )
           i f r e q . method == ’POST ’ :
                   comment form = CommentForm ( r e q u e s t . POST)
                   comment = comment form . s a v e ( )
           payload = { ’ post ’ : post ,
                                  ’ comments ’ :
                                 Comment . o b j e c t s . f i l t e r ( p o s t i d=p o s t i d ) ,
                                  ’ comment form ’ : CommentForm ( ) }
           r e t u r n r e n d e r t o r e s p o n s e ( ’ p o s t . html ’ ,
                                                         payload ,
                                                         RequestContext ( req ))
Templates
Introduction        Using django       Features of django     Reuseable apps   End Notes




                                   django template


       {% e x t e n d s ” b a s e . html ” %}
       {% b l o c k body %}
           {% i f u s e r . i s a u t h e n t i c a t e d %}
                    Welcome {{ u s e r . g e t f u l l n a m e }}
           {% e l s e %}
                   {% i n c l u d e ” l o g i n . html ” %}
           {% e n d i f %}

        ...

       {% e n d b l o c k %}
Features
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
Introduction       Using django   Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
           • Caching
Introduction        Using django    Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
           • Caching
           • Internationalization
Introduction        Using django    Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
           • Caching
           • Internationalization
           • RSS
Introduction        Using django    Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
           • Caching
           • Internationalization
           • RSS
           • CSRF protection
Introduction        Using django    Features of django   Reuseable apps   End Notes




           • Admin Interface
           • Generic Views
           • Testing Tools
           • Sessions
           • Authentication
           • Caching
           • Internationalization
           • RSS
           • CSRF protection
           • File Storage
Django Documentation
Introduction         Using django   Features of django   Reuseable apps   End Notes




               General conventions adopted by the community
Introduction        Using django        Features of django      Reuseable apps        End Notes




                                   Use template tags



      <p>The t i m e i s {% c u r r e n t t i m e ”%I :%M %p” %}.</p>

       from d j a n g o import t e m p l a t e
       def d o c u r r e n t t i m e ( p a r s e r , t o k e n ) :
           tag name , f o r m a t s t r i n g = t o k e n . s p l i t c o n t e n t s ( )
           r e t u r n CurrentTimeNode ( f o r m a t s t r i n g [ 1 : − 1 ] )
Introduction          Using django         Features of django       Reuseable apps         End Notes




                                         Use Signals

       from d j a n g o . c o r e . s i g n a l s import r e q u e s t f i n i s h e d

       r e q u e s t f i n i s h e d . connect ( my callback )


       from d j a n g o . db . m o d e l s . s i g n a l s import p r e s a v e
       from myapp . m o d e l s import MyModel

       def m y h a n d l e r ( s e n d e r , ∗∗ k w a r g s ) :
           ...

               p r e s a v e . c o n n e c t ( m y h a n d l e r , s e n d e r=MyModel )
Introduction      Using django   Features of django   Reuseable apps   End Notes




                                   Basics



           • Take template_name and extra_context every where
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                       Basics



           • Take template_name and extra_context every where
           • Write urls in applications
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                       Basics



           • Take template_name and extra_context every where
           • Write urls in applications
           • Import from the application level
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                       Basics



           • Take template_name and extra_context every where
           • Write urls in applications
           • Import from the application level
           • Prefix template name with directory
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                       Basics



           • Take template_name and extra_context every where
           • Write urls in applications
           • Import from the application level
           • Prefix template name with directory
           • Use MEDIA_URL in templates
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                       Basics



           • Take template_name and extra_context every where
           • Write urls in applications
           • Import from the application level
           • Prefix template name with directory
           • Use MEDIA_URL in templates
           • Reverse url patterns
Introduction          Using django           Features of django         Reuseable apps           End Notes




                                     Basics Done right

       def r e g i s t e r ( r e q u e s t , backend , s u c c e s s u r l=None ,
                             f o r m c l a s s=None ,
                             d i s a l l o w e d u r l=
                             ’ registration disallowed ’ ,
                             t e m p l a t e n a m e=
                             ’ r e g i s t r a t i o n / r e g i s t r a t i o n f o r m . html ’ ,
                             e x t r a c o n t e x t=None ) :


                               ...

         return r e n d e r t o r e s p o n s e ( template name ,
                                                  { ’ form ’ : form } ,
                                                  context )
Introduction       Using django   Features of django   Reuseable apps   End Notes




                                  Advanced




           • Use Template Response
Introduction       Using django       Features of django   Reuseable apps   End Notes




                                  Advanced




           • Use Template Response
           • Write Views as Classes
There is an app for that
For every size and style
Introduction   Using django     Features of django   Reuseable apps   End Notes




                         Github Search ”django”
Introduction   Using django   Features of django   Reuseable apps   End Notes
Introduction          Using django     Features of django   Reuseable apps   End Notes




                                     Pinax Features
           •   openid support
           •   email verification
           •   password management
           •   site announcements
           •   a notification framework
           •   user-to-user messaging
           •   friend invitation (both internal and external to the site)
           •   a basic twitter clone
           •   oembed support
           •   gravatar support
           •   interest groups (called tribes)
           •   projects with basic task and issue management
           •   threaded discussions
           •   wikis with multiple markup support
           •   blogging
           •   bookmarks
Introduction   Using django     Features of django          Reuseable apps    End Notes




                              django-mingus

      django extensions                       view cache utils
      basic                                   contact form
      flatblocks                              honeypot
      disqus                                  sugar
      navbar                                  quoteme
      djangodblog                             django− s t a t i c f i l e s
      sorl                                    django−b i t l y
      oembded                                 d j a n g o −t w i t t e r
      template utils                          python−t w i t t e r
      django proxy                            d j a n g o −wysiwyg
      compressor                              d j a n g o −s l i m m e r
      django markup                           d j a n g o −c r o p p e r
      google analytics                        d j a n g o −r e q u e s t
Django users
Introduction       Using django     Features of django   Reuseable apps   End Notes




                                  Popular Users


           • Media
              • LA Times
              • NY Times
              • Washington Post
              • Guardian
Introduction       Using django     Features of django   Reuseable apps   End Notes




                                  Popular Users


           • Media
              • LA Times
              • NY Times
              • Washington Post
              • Guardian
           • Web2.0
              • Mahalo: 10 million Page views
              • Pownce, SixApart
Introduction        Using django     Features of django   Reuseable apps   End Notes




                                   Popular Users


           • Media
              • LA Times
              • NY Times
              • Washington Post
              • Guardian
           • Web2.0
              • Mahalo: 10 million Page views
              • Pownce, SixApart
           • Full List: djangosites.com
Introduction         Using django     Features of django   Reuseable apps   End Notes




                                        NASA




                   After an extensive trade study, we selected Django ...
               as the first and primary application environment for the
               Nebula Cloud.
Introduction       Using django   Features of django   Reuseable apps   End Notes




                         Enterprise Adoption Hurdles




           • Multiple Databases
Introduction       Using django     Features of django   Reuseable apps   End Notes




                         Enterprise Adoption Hurdles




           • Multiple Databases
           • Dynamic settings infrastructure
Introduction         Using django   Features of django   Reuseable apps   End Notes




                           Enterprise Adoption Hurdles




           • Multiple Databases
           • Dynamic settings infrastructure
           • Tools
Introduction         Using django    Features of django   Reuseable apps   End Notes




                                    About Me
           •   lakshman@agiliqsolutions.com, @becomingGuru
           •   lakshmanprasad.com
           •   Agiliq Solutions Formerly, Usware Technologies @agiliq
           •   Team of Expert Django Developers, Happy Clients
http://www.agiliqsolutions.com/
Introduction                   Using django                        Features of django                        Reuseable apps                End Notes




                                                     Image Attributions



       h t t p : / /www . f l i c k r . com/ p h o t o s / t e j e d o r o d e l u z /3157690060/
       h t t p : / /www . f l i c k r . com/ p h o t o s /23820645 @N05 /4287681570/
       h t t p : / /www . f l i c k r . com/ p h o t o s / a i d a n j o n e s /3575000735/
       http :// j a c o b i a n . org /
       h t t p : / / s a n j u a n c o l l e g e . edu / l i b / i m a g e s / p h i l o s o p h y b r a i n . j p g
       h t t p : / /www . f l i c k r . com/ p h o t o s / uhop /105062059/
       h t t p : / / s 3 . amazonaws . com/memebox/ u p l o a d s /136/ e x p o n e n t i a l g r a p h 2 . j p g
       h t t p : / / g e e k a n d p o k e . t y p e p a d . com/ g e e k a n d p o k e / i m a g e s /2008/06/03/ s e x p l 1 8 . j p g
       h t t p : / /www . f l i c k r . com/ p h o t o s / go /253819/
       h t t p : / / a r o u n d t h e s p h e r e . f i l e s . w o r d p r e s s . com /2009/05/ s w i s s −army−k n i f e . j p g
       h t t p : / /www . f r e e f o t o . com/ i m a g e s /41/04/41 0 4 9− −Keep−L e f t w e b . j p g
                                                                                              −
       h t t p : / /www . f l i c k r . com/ p h o t o s / o r i n r o b e r t j o h n /114430223/
?

More Related Content

What's hot

50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco GrassiShakacon
 
Introduction to iOS Apps Development
Introduction to iOS Apps DevelopmentIntroduction to iOS Apps Development
Introduction to iOS Apps DevelopmentProf. Erwin Globio
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overviewJong Soon Bok
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoChariza Pladin
 
Python PPT
Python PPTPython PPT
Python PPTEdureka!
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Detecting stress based on social interactions in social networks
Detecting stress based on social interactions in social networksDetecting stress based on social interactions in social networks
Detecting stress based on social interactions in social networksVenkat Projects
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondKaushal Dhruw
 
Android와 Flutter 앱 개발의 큰 차이점 5가지
Android와 Flutter 앱 개발의 큰 차이점 5가지Android와 Flutter 앱 개발의 큰 차이점 5가지
Android와 Flutter 앱 개발의 큰 차이점 5가지Bansook Nam
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Sam Bowne
 

What's hot (20)

50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
 
.Net Core
.Net Core.Net Core
.Net Core
 
Introduction to iOS Apps Development
Introduction to iOS Apps DevelopmentIntroduction to iOS Apps Development
Introduction to iOS Apps Development
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Flutter
FlutterFlutter
Flutter
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and Django
 
Python PPT
Python PPTPython PPT
Python PPT
 
Models for hierarchical data
Models for hierarchical dataModels for hierarchical data
Models for hierarchical data
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Detecting stress based on social interactions in social networks
Detecting stress based on social interactions in social networksDetecting stress based on social interactions in social networks
Detecting stress based on social interactions in social networks
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Android와 Flutter 앱 개발의 큰 차이점 5가지
Android와 Flutter 앱 개발의 큰 차이점 5가지Android와 Flutter 앱 개발의 큰 차이점 5가지
Android와 Flutter 앱 개발의 큰 차이점 5가지
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 

Viewers also liked

Customizing the Django Admin
Customizing the Django AdminCustomizing the Django Admin
Customizing the Django AdminLincoln Loop
 
Intro to Angular Directives using Interactive charting directives that use Hi...
Intro to Angular Directives using Interactive charting directives that use Hi...Intro to Angular Directives using Interactive charting directives that use Hi...
Intro to Angular Directives using Interactive charting directives that use Hi...Lakshman Prasad
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django IntroductionGanga Ram
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 

Viewers also liked (7)

Django in the Real World
Django in the Real WorldDjango in the Real World
Django in the Real World
 
Customizing the Django Admin
Customizing the Django AdminCustomizing the Django Admin
Customizing the Django Admin
 
Intro to Angular Directives using Interactive charting directives that use Hi...
Intro to Angular Directives using Interactive charting directives that use Hi...Intro to Angular Directives using Interactive charting directives that use Hi...
Intro to Angular Directives using Interactive charting directives that use Hi...
 
Introduction to Makefile
Introduction to MakefileIntroduction to Makefile
Introduction to Makefile
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 

Similar to Building Pluggable Web Applications using Django

djangoic approach to implement common web development paradigms
djangoic approach to implement common web development paradigmsdjangoic approach to implement common web development paradigms
djangoic approach to implement common web development paradigmsLakshman Prasad
 
a hands on guide to django
a hands on guide to djangoa hands on guide to django
a hands on guide to djangoswee meng ng
 
learnpythondjangochapteroneintroduction.pptx
learnpythondjangochapteroneintroduction.pptxlearnpythondjangochapteroneintroduction.pptx
learnpythondjangochapteroneintroduction.pptxbestboybulshaawi
 
To GO or not to GO
To GO or not to GOTo GO or not to GO
To GO or not to GOsuperstas88
 
Web Development Paradigms and djangoic approach to deal with them
Web Development Paradigms and djangoic approach to deal with themWeb Development Paradigms and djangoic approach to deal with them
Web Development Paradigms and djangoic approach to deal with themLakshman Prasad
 
Introducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyIntroducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyNikhil Mungel
 
Intro To Django
Intro To DjangoIntro To Django
Intro To DjangoUdi Bauman
 
Django tutorial
Django tutorialDjango tutorial
Django tutorialKsd Che
 
Two scoops of django version one
Two scoops of django   version oneTwo scoops of django   version one
Two scoops of django version oneviv123
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1MicroPyramid .
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersRosario Renga
 
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 FrameworkRicardo Soares
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersChristine Cheung
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoRodolfo Carvalho
 

Similar to Building Pluggable Web Applications using Django (20)

djangoic approach to implement common web development paradigms
djangoic approach to implement common web development paradigmsdjangoic approach to implement common web development paradigms
djangoic approach to implement common web development paradigms
 
a hands on guide to django
a hands on guide to djangoa hands on guide to django
a hands on guide to django
 
Dojango
DojangoDojango
Dojango
 
Django by rj
Django by rjDjango by rj
Django by rj
 
learnpythondjangochapteroneintroduction.pptx
learnpythondjangochapteroneintroduction.pptxlearnpythondjangochapteroneintroduction.pptx
learnpythondjangochapteroneintroduction.pptx
 
django
djangodjango
django
 
Django
DjangoDjango
Django
 
Django
DjangoDjango
Django
 
Django cms best practices
Django cms best practicesDjango cms best practices
Django cms best practices
 
To GO or not to GO
To GO or not to GOTo GO or not to GO
To GO or not to GO
 
Web Development Paradigms and djangoic approach to deal with them
Web Development Paradigms and djangoic approach to deal with themWeb Development Paradigms and djangoic approach to deal with them
Web Development Paradigms and djangoic approach to deal with them
 
Introducing Command Line Applications with Ruby
Introducing Command Line Applications with RubyIntroducing Command Line Applications with Ruby
Introducing Command Line Applications with Ruby
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
Two scoops of django version one
Two scoops of django   version oneTwo scoops of django   version one
Two scoops of django version one
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1
 
Django Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python DevelopersDjango Framework Overview forNon-Python Developers
Django Framework Overview forNon-Python Developers
 
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
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django Developers
 
Go 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX GoGo 1.10 Release Party - PDX Go
Go 1.10 Release Party - PDX Go
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Building Pluggable Web Applications using Django

  • 1. Introduction Using django Features of django Reuseable apps End Notes Building Pluggable Web Applications using Lakshman Prasad Agiliq Solutions April 21, 2010
  • 2. Introduction Using django Features of django Reuseable apps End Notes • For building database driven web applications
  • 3. Introduction Using django Features of django Reuseable apps End Notes • For building database driven web applications • Emphasis on Reuse, DRY and simplicity
  • 4. Introduction Using django Features of django Reuseable apps End Notes Hypothetical Application
  • 5. Introduction Using django Features of django Reuseable apps End Notes Install a pluggable app django-star-rating $pip install django-star-rating INSTALLED APPS = ( ’ django . c o n t r i b . auth ’ , ’ django . c o n t r i b . contenttypes ’ , ’ django . c o n t r i b . sessions ’ , ’ django . c o n t r i b . sites ’ , ’ django . c o n t r i b . admin ’ , ’ starrating ’ , )
  • 6. Introduction Using django Features of django Reuseable apps End Notes Point to an url pattern from b l o g . m o d e l s import P o s t urlpatterns = patterns ( ’ ’ , ( r ’ ˆ$ ’ , ’ b l o g . v i e w s . i n d e x ’ ) , ( r ’ s t a r i n g /$ ’ , { model : P o s t } , ’ s t a r r a t i n g . views . star ’ ) , )
  • 7. Introduction Using django Features of django Reuseable apps End Notes Put the rating where you want! <html> <head> < t i t l e>{{ page . t i t l e }}</ t i t l e> <body> {% s t a r r a t i n g %} <d i v> {{ page . c o n t e n t }} </ d i v> ... </body> ...
  • 8. Introduction Using django Features of django Reuseable apps End Notes Thats it!
  • 9. Introduction Using django Features of django Reuseable apps End Notes Introduction Definition A Case Study: Youtube Stars Overview Philosophy Using django MTV Features of django Features Reuseable apps Writing reuseable apps Community Applications End Notes Django Stats Common Enterprise Hurdles Other
  • 10. Introduction Using django Features of django Reuseable apps End Notes Developed at Lawrence-Journal World
  • 11. 5 million hits per month
  • 13. Majority of the features community contributed
  • 14. 5 years since Open Source
  • 15. Introduction Using django Features of django Reuseable apps End Notes Philosophy
  • 18. Introduction Using django Features of django Reuseable apps End Notes Convention Over Configuration
  • 22. Introduction Using django Features of django Reuseable apps End Notes Model Syntax from d j a n g o . db import m o d e l s c l a s s P o s t ( m o d e l s . Model ) : t i t l e = m o d e l s . C h a r F i e l d ( m a x l e n g t h =100) t e x t = models . T e x t F i e l d ( ) datetime = models . DateTimeField ( ) c l a s s Meta : o r d e r i n g = ( ’−d a t e t i m e ’ , ) def unicode ( self ): return s e l f . t i t l e c l a s s Comment ( m o d e l s . Model ) : post = models . ForeignKey ( Post ) t e x t = models . T e x t F i e l d ( )
  • 23. Introduction Using django Features of django Reuseable apps End Notes Model API >>>from b l o g . m o d e l s import Post , Comment >>>p o s t = P o s t . o b j e c t s . a l l ( ) [ 0 ] >>>p o s t c o m m e n t s = p o s t . c om m en t s et . a l l ( )
  • 24. Introduction Using django Features of django Reuseable apps End Notes Admin by models alone
  • 25. Introduction Using django Features of django Reuseable apps End Notes Admin Syntax from d j a n g o . c o n t r i b import admin from m o d e l s import Post , Comment c l a s s PostAdmin ( admin . ModelAdmin ) : l i s t d i s p l a y = ( ’ t i t l e ’ , ’ datetime ’ ) c l a s s CommentAdmin ( admin . ModelAdmin ) : l i s t d i s p l a y = ( ’ text ’ ,) admin . s i t e . r e g i s t e r ( Post , PostAdmin ) admin . s i t e . r e g i s t e r ( Comment , CommentAdmin )
  • 29. Introduction Using django Features of django Reuseable apps End Notes Ugly urls h t t p : / / a r t . com/ a r t g a l l e r y / d e f a u l t . a s p ? s i d =9DF4BC0580DF11D3ACB60090271E26A8 &command= f r e e l i s t h t t p : / / p r e v i e w . y n o t . com/ c g i b i n / n d C G I 5 0 . c g i / Y n o t P h o e n i x / CFsMain .
  • 30. Introduction Using django Features of django Reuseable apps End Notes Good urls h t t p : / /www. w i r e d . com/ a p p l e / MacbookPro / h t t p : / / devmarch . com/ d e v e l o p e r s u m m i t / s p e a k e r s . html
  • 31. Introduction Using django Features of django Reuseable apps End Notes django url pattern from b l o g . m o d e l s import P o s t urlpatterns = patterns ( ’ ’ , ( r ’ ˆ$ ’ , ’ b l o g . v i e w s . i n d e x ’ ) , ( r ’ s t a r i n g /$ ’ , { model : P o s t } , ’ s t a r r a t i n g . views . star ’ ) , )
  • 32. Views
  • 33. Introduction Using django Features of django Reuseable apps End Notes django views from d j a n g o . h t t p import H t t p R e s p o n s e def p o s t ( r e q u e s t ) : r e t u r n H t t p R e s p o n s e ( ’ H e l l o World ! ’ )
  • 34. Introduction Using django Features of django Reuseable apps End Notes django views def p o s t ( r e q u e s t , p o s t i d ) : p o s t = P o s t . o b j e c t s . g e t ( pk=p o s t i d ) i f r e q . method == ’POST ’ : comment form = CommentForm ( r e q u e s t . POST) comment = comment form . s a v e ( ) payload = { ’ post ’ : post , ’ comments ’ : Comment . o b j e c t s . f i l t e r ( p o s t i d=p o s t i d ) , ’ comment form ’ : CommentForm ( ) } r e t u r n r e n d e r t o r e s p o n s e ( ’ p o s t . html ’ , payload , RequestContext ( req ))
  • 36. Introduction Using django Features of django Reuseable apps End Notes django template {% e x t e n d s ” b a s e . html ” %} {% b l o c k body %} {% i f u s e r . i s a u t h e n t i c a t e d %} Welcome {{ u s e r . g e t f u l l n a m e }} {% e l s e %} {% i n c l u d e ” l o g i n . html ” %} {% e n d i f %} ... {% e n d b l o c k %}
  • 38. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface
  • 39. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views
  • 40. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools
  • 41. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions
  • 42. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication
  • 43. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication • Caching
  • 44. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication • Caching • Internationalization
  • 45. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication • Caching • Internationalization • RSS
  • 46. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication • Caching • Internationalization • RSS • CSRF protection
  • 47. Introduction Using django Features of django Reuseable apps End Notes • Admin Interface • Generic Views • Testing Tools • Sessions • Authentication • Caching • Internationalization • RSS • CSRF protection • File Storage
  • 49. Introduction Using django Features of django Reuseable apps End Notes General conventions adopted by the community
  • 50. Introduction Using django Features of django Reuseable apps End Notes Use template tags <p>The t i m e i s {% c u r r e n t t i m e ”%I :%M %p” %}.</p> from d j a n g o import t e m p l a t e def d o c u r r e n t t i m e ( p a r s e r , t o k e n ) : tag name , f o r m a t s t r i n g = t o k e n . s p l i t c o n t e n t s ( ) r e t u r n CurrentTimeNode ( f o r m a t s t r i n g [ 1 : − 1 ] )
  • 51. Introduction Using django Features of django Reuseable apps End Notes Use Signals from d j a n g o . c o r e . s i g n a l s import r e q u e s t f i n i s h e d r e q u e s t f i n i s h e d . connect ( my callback ) from d j a n g o . db . m o d e l s . s i g n a l s import p r e s a v e from myapp . m o d e l s import MyModel def m y h a n d l e r ( s e n d e r , ∗∗ k w a r g s ) : ... p r e s a v e . c o n n e c t ( m y h a n d l e r , s e n d e r=MyModel )
  • 52. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where
  • 53. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where • Write urls in applications
  • 54. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where • Write urls in applications • Import from the application level
  • 55. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where • Write urls in applications • Import from the application level • Prefix template name with directory
  • 56. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where • Write urls in applications • Import from the application level • Prefix template name with directory • Use MEDIA_URL in templates
  • 57. Introduction Using django Features of django Reuseable apps End Notes Basics • Take template_name and extra_context every where • Write urls in applications • Import from the application level • Prefix template name with directory • Use MEDIA_URL in templates • Reverse url patterns
  • 58. Introduction Using django Features of django Reuseable apps End Notes Basics Done right def r e g i s t e r ( r e q u e s t , backend , s u c c e s s u r l=None , f o r m c l a s s=None , d i s a l l o w e d u r l= ’ registration disallowed ’ , t e m p l a t e n a m e= ’ r e g i s t r a t i o n / r e g i s t r a t i o n f o r m . html ’ , e x t r a c o n t e x t=None ) : ... return r e n d e r t o r e s p o n s e ( template name , { ’ form ’ : form } , context )
  • 59. Introduction Using django Features of django Reuseable apps End Notes Advanced • Use Template Response
  • 60. Introduction Using django Features of django Reuseable apps End Notes Advanced • Use Template Response • Write Views as Classes
  • 61. There is an app for that
  • 62. For every size and style
  • 63. Introduction Using django Features of django Reuseable apps End Notes Github Search ”django”
  • 64. Introduction Using django Features of django Reuseable apps End Notes
  • 65. Introduction Using django Features of django Reuseable apps End Notes Pinax Features • openid support • email verification • password management • site announcements • a notification framework • user-to-user messaging • friend invitation (both internal and external to the site) • a basic twitter clone • oembed support • gravatar support • interest groups (called tribes) • projects with basic task and issue management • threaded discussions • wikis with multiple markup support • blogging • bookmarks
  • 66. Introduction Using django Features of django Reuseable apps End Notes django-mingus django extensions view cache utils basic contact form flatblocks honeypot disqus sugar navbar quoteme djangodblog django− s t a t i c f i l e s sorl django−b i t l y oembded d j a n g o −t w i t t e r template utils python−t w i t t e r django proxy d j a n g o −wysiwyg compressor d j a n g o −s l i m m e r django markup d j a n g o −c r o p p e r google analytics d j a n g o −r e q u e s t
  • 68. Introduction Using django Features of django Reuseable apps End Notes Popular Users • Media • LA Times • NY Times • Washington Post • Guardian
  • 69. Introduction Using django Features of django Reuseable apps End Notes Popular Users • Media • LA Times • NY Times • Washington Post • Guardian • Web2.0 • Mahalo: 10 million Page views • Pownce, SixApart
  • 70. Introduction Using django Features of django Reuseable apps End Notes Popular Users • Media • LA Times • NY Times • Washington Post • Guardian • Web2.0 • Mahalo: 10 million Page views • Pownce, SixApart • Full List: djangosites.com
  • 71. Introduction Using django Features of django Reuseable apps End Notes NASA After an extensive trade study, we selected Django ... as the first and primary application environment for the Nebula Cloud.
  • 72. Introduction Using django Features of django Reuseable apps End Notes Enterprise Adoption Hurdles • Multiple Databases
  • 73. Introduction Using django Features of django Reuseable apps End Notes Enterprise Adoption Hurdles • Multiple Databases • Dynamic settings infrastructure
  • 74. Introduction Using django Features of django Reuseable apps End Notes Enterprise Adoption Hurdles • Multiple Databases • Dynamic settings infrastructure • Tools
  • 75. Introduction Using django Features of django Reuseable apps End Notes About Me • lakshman@agiliqsolutions.com, @becomingGuru • lakshmanprasad.com • Agiliq Solutions Formerly, Usware Technologies @agiliq • Team of Expert Django Developers, Happy Clients
  • 77. Introduction Using django Features of django Reuseable apps End Notes Image Attributions h t t p : / /www . f l i c k r . com/ p h o t o s / t e j e d o r o d e l u z /3157690060/ h t t p : / /www . f l i c k r . com/ p h o t o s /23820645 @N05 /4287681570/ h t t p : / /www . f l i c k r . com/ p h o t o s / a i d a n j o n e s /3575000735/ http :// j a c o b i a n . org / h t t p : / / s a n j u a n c o l l e g e . edu / l i b / i m a g e s / p h i l o s o p h y b r a i n . j p g h t t p : / /www . f l i c k r . com/ p h o t o s / uhop /105062059/ h t t p : / / s 3 . amazonaws . com/memebox/ u p l o a d s /136/ e x p o n e n t i a l g r a p h 2 . j p g h t t p : / / g e e k a n d p o k e . t y p e p a d . com/ g e e k a n d p o k e / i m a g e s /2008/06/03/ s e x p l 1 8 . j p g h t t p : / /www . f l i c k r . com/ p h o t o s / go /253819/ h t t p : / / a r o u n d t h e s p h e r e . f i l e s . w o r d p r e s s . com /2009/05/ s w i s s −army−k n i f e . j p g h t t p : / /www . f r e e f o t o . com/ i m a g e s /41/04/41 0 4 9− −Keep−L e f t w e b . j p g − h t t p : / /www . f l i c k r . com/ p h o t o s / o r i n r o b e r t j o h n /114430223/
  • 78. ?