Django
-
Upload
chaitanaya-sethi -
Category
Software
-
view
203 -
download
2
Transcript of Django
is a
Python Framework
What is
Google defines Django as“Django is a high-level Python Web framework that
encourages rapid development and clean, pragmatic design”
In much simple terms it is best suitable for perfectionists with deadlines.
i.e. SOFTWARE BACKED BY DATABASE.
Django Interface
Django code || to Python
STEPS1. Requirements planning
evaluate user’s demand.2. User design
deciding on the design of the user interface.
3. Rapid constructionbuild a prototype and demonstrate it to the user.
4. Cutover Convert from prototype
to final product.
MVT Structure (Model View Template)
Model database
interfaceView logic for database
I/O Template display logic
Fast Rapid Application Development Secure Helps developer avoiding
security concerns Scalable Quick and flexible scaling. Provides both admin and client control Features ORM i.e. Object Relational
Mapping Encapsulates the code needed to
manipulate data Saves from SQL Prevents from reinventing the
wheel/hustle free development. Loosely Coupled
detailed explanation..
Why Django?
TRADITIONAL MODELS DJANGO
Build Data Dictionary Built-in
Build Data Base Interface Built-in
Build Authoring Tools Built-in
Build Logic Built-in
Build Data Flow Built-in
Paint Templates Built-in
Cross Site Scripting (XSS) ProtectionCross Site Request Forgery (CSRF) ProtectionSQL Injection ProtectionClickjacking ProtectionSSL/HTTPSHost Header ValidationSession SecurityUser upload content
Security
DJANGO is ‘LOOSELY’ COUPLED !
Coupling in programming refers to the inter dependency of modules.
Thus, program efficiency is inversely proportional to coupling. Django is loosely coupled and thus provides better effeciency.
ShabingoInstagramCrowdStreetParts of windows appQuizZoddleIt.MagezinePinterest
5000+ apps
Web applications using Django (completely or partially)
1. Install Python from https://python.org/download/ (Since it’s a python framework Python installation is
must)2. Install Setup tools from
https://pypi.python.org/pypi/setuptools3. Install PIP from
https://pip.pypa.io/en/latest/installing.html i.e. Python Package Index, works as a python manager.4. Install Django from
https://www.djangoproject.com/download/5. Django officially supports database
1. PostgreSQL2. MySQL3. SQLite
Install
Common pitfalls and their solutions
Problem Django-admin may only display text no matter what argument is given.
This occurs due to problem with file association in Windows
Solution Check if there is more than one environment variable set for running
Python scripts in PATH. This usually occurs when there is more than one Python version installed.
Problem There might be problem in running the commands easy_install pip and pip install django. This happens when connecting internet behind the proxy.
Solution Set environment variables for proxy configuration in
command prompt as :-