Django
Presentation by: Sachin Kumbhojkar Msc(CA) , Freelancer
What is DJANGO ?
Django is a high-level Python Web framework
that encourages rapid development and
clean, pragmatic design
Oh man I feel like
Now !
Lets talk like humans
•Django is a framework for python
•Enables fast software development
•Follows Model View Control pattern
Basic Info
•Python Framework
•License Type: BSD
•Follows MVC architecture
•Maintained by Django software foundation
•Websites that uses django
•Instagram
•Mozilla
•Pinterest
Key Features
Mocked up your head ?
Don’t worry , here is the Explaination
1. Object Relational Mapper
In Simple terms
Absolutely no ‘Locha’ to retrieve data
Hmm… then how will we manage database ?
You can write and access your database and its
queries
ENTIRELY IN PYTHON
Wanna see How ?
Example
Creating a table named person having columns
first_name and last_name having length 30
Mysql
create table person (first_name
text(30),last_name text(30));
Django
class Person(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
But dude you can still write sql queries if needed
2. Automatic Admin Interface
Does this sounds interesting ?
Django
Provides you with Admin interface
No need to create it explicitly
Django admin interface
The django admin interface gets
created at the time of creation of a
new project
You just need to enable it with few
steps
3. Elegant Url design
You can define your own urls
and the actions too
Like the url is
127.0.0.1/myapp/yodudeareyouthere
you can define what should happen after
anyone entering this url
4. Template System
Django has its own templating languages
Which supports
Dynamic Templates
And provide you with data also
In short template is the User Interface for
application
What is the use ?
to separate design, content and Python code.
5. Cache System
Now first of all lets learn how to pronounce it
http://www.youtube.com/watch?v=_rCcV6M
iQZ0
Cache is pronounced as CASH
Now what is that
The cache system actually lets you cache/save
the dynamic pages
Use ?
You don’t need to handle each request for
them
6. Internationalization
Django has full support for
Multi-language application (speaking languages
not programming languages ), letting you specify
translation strings and providing hooks for
language-specific functionality.
Remember
Django is just a framework for python which is
written in python itself
Everything you do in Django , at the end of
the day its python
So the basic python rules apply here also
, such as code indentation , classes etc
Do send
Comments / Questions / Ideas
To
sachin755@gmail.com
Django part 1