Presentation is loading. Please wait.

Presentation is loading. Please wait.

Who uses it? MichaelMoore.com What's it all about? Rapid Development Clean, Pragmatic Design.

Similar presentations


Presentation on theme: "Who uses it? MichaelMoore.com What's it all about? Rapid Development Clean, Pragmatic Design."— Presentation transcript:

1

2 Who uses it? MichaelMoore.com

3 What's it all about? Rapid Development Clean, Pragmatic Design

4 MVC -> MTV Except in their terminology, the "view" is the controller and the "template" is the view, kind of Model URLconf Template View

5 Model Layer Each model maps to a single database table Django comes with a built in ORM

6 Model Layer

7 Model Fields Django offers field options and field types Examples: Field.default returns default value of a field Field.primary_key returns true if the field is the primary key

8 SQL Django has an API for CRUD

9 Databases SQLite - Default with Python PostgreSQL MySQL Oracle Or you can write your own engine.

10 URLconf Maps regex to view

11 Web Server Gateway Interface (WSGI) Python standard for web servers to communicate with web applications

12 View Layer Python function that takes a Web request and returns a Web response.

13 Response Can Be HTML contents of a Web page Redirect 404 error XML document Image anything, really.

14 View Layer

15 Template Layer This is the "view" in most web frameworks Can contain block tags or variables A block tag is a symbol within a template that does something; surrounded by "{%" and "%}" A variable is a symbol within a template that outputs a value; surrounded by "{{" and "}}"

16 Template Layer Similar to PHP

17 Structure Root Apps URLconf LibrariesWSGI App Directories ModelsTestsViewsTemplates

18 IDEs PyDev Eclipse Plugin PyCharm Komodo IDE Netbeans IntelliJ IDEA Ninja IDE Eric Python IDE Wing IDE Basic Text Editors (Komodo, VIM)

19

20 Conclusion Django is great for fast development from scratch Not great for integrating with legacy databases, although it is possible

21 References Django's Website


Download ppt "Who uses it? MichaelMoore.com What's it all about? Rapid Development Clean, Pragmatic Design."

Similar presentations


Ads by Google