Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Hitchikers Guide to Django2

The Hitchikers Guide to Django2

This was a introduction to latest version of Django2

Kurian Benoy

July 07, 2018

More Decks by Kurian Benoy

Other Decks in Programming


  1. The Hitchhiker's Guide to Django 2.0

  2. Understanding Audience Noobs Experts Designers

  3. Talk Outline • What is Django and why use Django?

    • Django architecture - MVT kind of MVC • How does Django works? • Simplified URL routing syntax in Django2 • Other new features in Django2 • When should you move your old project to Django2
  4. What is Django?

  5. Why is Django so Awesome? • Security • Django Admin

    • Build in Batteries • Great documentation • Friendly community • Stable • Open source
  6. Django Architecture

  7. The big picture about Django - MVT L

  8. How does Django Works?

  9. None
  10. 1. The browser sends request to your web server 2.

    Your web browser sends request to Web Server Gateway interface(WSGI) or directly serves to a HTML file 3. Unlike a web server , WSGI servers can run Python applications. The request populates a Python Dictionalry called environ , and passes several layers of middlewares, begore reaching your django application. 4. URL conf module which contains the urls.py of your project select a view to handle the request based on the requested URL. The requested view will be turned to HttpRequest, a Python object 5. The selected view typically does one or more of things : a) Talks to a database via models b) Renders HTML or any formatted response using templates c) Raise exception 6. The HttpResponse object gets rendered into string , it leaves django application 7. A beautifully rendered web page is seen
  11. Django 2.0

  12. History L

  13. Simplified URL routing syntax Django 1.11

  14. Simplified URL syntax Django 2.0

  15. Simplified URL routing syntax

  16. Mobile Friendly Admin

  17. Working Asynchronously • What if your server ends up waiting

    for a single request for a long time? • You are wasting your valuable time • Working asynchronously by celery, Django channel possible • Django channels 2 was released using python 3 async and await method
  18. When should you move your project to Django 2.0?

  19. Supported Versions

  20. New versioning system

  21. Tutorial Recommendation Django Girls Django tutorial - Polls app

  22. Thanks! Contact details: Github : @kurianbenoy Twitter : @kurianbenoy2 kurian.bkk@gmail.com

  23. Question