Download presentation
Presentation is loading. Please wait.
Published byEthelbert Price Modified over 9 years ago
1
D JANGO Leo Wang Daniel South Philip Kim
2
Introduction Open Source web application framework Released in 2005 Python is used throughout Speed of development
3
Django vs Rails Similarties: – Django is to Python as Rails is to Ruby – Model-View-Controller architectural – Emphasis is on Reuse, DRY and simplicity Differences: – Django has a built-in admin control whereas Rails doesn’t
4
Django Community
5
Rails Community
6
Common Uses Dynamic web pages – Guestbook – Poll voting – Forum – Social network
7
Features Session Framework – Store visitor data – Python dictionary Templates – Generate unique views – Built-in tags
8
Features Django admin interface – Designed for nontechnical users – User interface to perform tasks
9
Format Django Models Controller Python code Views.py Views Templates folder Html code Rails Models Controller Ruby code controller.rb Views Views folder html
10
Django Model Database Class function
11
Controller views.py forms.py urls.py tasks_list = Task.objects.filter(deleted=False).exclude().exclude().filter() task = Task.objects.get(id=1, deleted=False) url(r'^tasks/$', 'example.tasks.views.task_list')
12
Views Template folder Template tags Load, block, extend include {% load “....html” %} {{task.get_till_due|get_date}} {% if some_condition %} {% for some_iterator %} {{form.title.label}} {{form.title}}
13
Example 3974 ish?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.