Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
The Django Framework By Low Kian Seong
Who am I? <ul><li>@lowskter </li></ul>
Why Django <ul><li>Aka. How I became a Zope refugee. </li><ul><li>Events leading to me deflecting. </li></ul><li>Flexibili...
Backed by some of the arguably the greatest Pythonistas
Great community.
Good resources. A book, planet and mailing lists which are actively maintained. </li></ul>
Why Django <ul><li>Helper functions not hand holding functions
MVC </li><ul><li>Or … M-VC
Tight coupling of VC. </li></ul><li>Modular </li><ul><li>Ripping one thing out will not effect the engine. </li></ul><li>U...
Templates </li><ul><li>Limited functionality
Purposely made underpowered. Why? </li></ul></ul>
Django components <ul><li>Models
Views
urls
Templates </li></ul>
Django-Components <ul><li>models.py
Definition for database schemas and fields. </li></ul>
Django-Components <ul><li>views.py
Controlling what is being fed to the templates and others. The C in MVC. </li></ul>
Upcoming SlideShare
Loading in …5
×

* DJANGO - The Python Framework - Low Kian Seong, Developer

2,358 views

Published on

Published in: Technology
  • Be the first to comment

* DJANGO - The Python Framework - Low Kian Seong, Developer

  1. 1. The Django Framework By Low Kian Seong
  2. 2. Who am I? <ul><li>@lowskter </li></ul>
  3. 3. Why Django <ul><li>Aka. How I became a Zope refugee. </li><ul><li>Events leading to me deflecting. </li></ul><li>Flexibility vs. Usability
  4. 4. Backed by some of the arguably the greatest Pythonistas
  5. 5. Great community.
  6. 6. Good resources. A book, planet and mailing lists which are actively maintained. </li></ul>
  7. 7. Why Django <ul><li>Helper functions not hand holding functions
  8. 8. MVC </li><ul><li>Or … M-VC
  9. 9. Tight coupling of VC. </li></ul><li>Modular </li><ul><li>Ripping one thing out will not effect the engine. </li></ul><li>Useful decorators
  10. 10. Templates </li><ul><li>Limited functionality
  11. 11. Purposely made underpowered. Why? </li></ul></ul>
  12. 12. Django components <ul><li>Models
  13. 13. Views
  14. 14. urls
  15. 15. Templates </li></ul>
  16. 16. Django-Components <ul><li>models.py
  17. 17. Definition for database schemas and fields. </li></ul>
  18. 18. Django-Components <ul><li>views.py
  19. 19. Controlling what is being fed to the templates and others. The C in MVC. </li></ul>
  20. 20. Django-Components <ul><li>urls.py
  21. 21. Controlling what is served up based on the url that the user is accessing.
  22. 22. Lots of regex and pattern matching here. </li></ul>
  23. 23. Some Django tools that are used in a lot of projects <ul><li>This slide is also known as Django killer features
  24. 24. Some of django's killer features … </li><ul><li>Admin interface
  25. 25. Generic Views
  26. 26. Tags and Filters
  27. 27. Development server
  28. 28. Loose coupling </li></ul></ul>
  29. 29. Admin interface <ul><li>One liner to data modelling </li></ul>
  30. 30. Generic Views <ul><li>Quick scripts for CRUD
  31. 31. Powerful and Extensible engine.
  32. 32. Some of the generic views available: </li><ul><li>Simple redirects
  33. 33. Date based actions
  34. 34. List helper functionalities. </li></ul><li>Shrinking your code size while adding the functionality. </li></ul>
  35. 35. Django-Generic Views <ul><li>Simple Views
  36. 36. A simple view: </li></ul>urlpatterns = patterns('django.views.generic.simple', (r'^foo/$', 'direct_to_template', {'template': 'foo_index.html'}), (r'^foo/(?P<id>d+)/$', 'direct_to_template', {'template': 'foo_detail.html'}), )
  37. 37. What if you wanted to do more with templates? <ul><li>For those who think the templates are not powerful enough.
  38. 38. Some default built in django tags and filters.
  39. 39. Custom tags and filters. </li></ul>
  40. 40. Django javascript support <ul><li>Rails vs. Django vs. TG javascript support
  41. 41. Underpowered? </li></ul>
  42. 42. Django deployment <ul><li>Apache – mod_python/mod_wsgi
  43. 43. Windows/Linux support </li></ul>
  44. 44. Case Study <ul><li>Process script
  45. 45. Data modelling and manipulations
  46. 46. Two case studies-processing scripts+django web front
  47. 47. Leveraging the dynamic Python programming language for various system tasks. What? No bash?! </li></ul>
  48. 48. Some interesting modules that I want <ul><li>Django-evolve
  49. 49. Django-sqlalchemy </li></ul>
  50. 50. Django resources <ul><li>Django modules
  51. 51. Django snippets examples
  52. 52. Free Django book! </li></ul>
  53. 53. Q&A Q&A Session

×