Ayush Django Report
Ayush Django Report
Content
1. Introduction
2. How does Django Work?
2.1 Model…………………………………………………………………………….
2.2 View…................................................................................
2.3 Template……………………………………………………………………….
3. Django History
5. Advantages of Django
6. Django Overview
7. Features of Django
7.2 Secure……………………………………………………………………………
7.3 Scalable…………………………………………………………………………..
7.5 Varsatile………………………………………………………………………….
12. Colclusiom
3
1. Introduction
Django is a Python framework that makes it easier to create web sites
using Python
Django takes care of the difficult stuff so that you can concentrate on
building your web applications.
Model - The data you want to present, usually data from a database.
View - A request handler that returns the relevant template and
content - based on the request from the user.
4
Template - A text file (like an HTML file) containing the layout of the
web page, with logic on how to display the data.
2.1 Model
The model provides data from the database.
The most common way to extract data from a database is SQL. One
problem with SQL is that you have to have a pretty good understanding
of the database structure to be able to work with it.Django, with ORM,
makes it easier to communicate with the database, without having to
write complex SQL statements.
2.2 View
A view is a function or method that takes http requests as arguments,
imports the relevant model(s), and finds out what data to send to the
template, and returns the final result.
2.3 Template
A template is a file where you describe how the result should be
represented.
Templates are often .html files, with HTML code describing the layout
of a web page, but it can also be in other file formats to present other
results, but we will concentrate on .html files.
Django uses standard HTML to describe the layout, but uses Django
tags to add logic:
<h1>My Homepage</h1>
Model View
Template
6
3. Django History
Django was invented by Lawrence Journal-World in 2003, to meet the short deadlines in the newspaper
and at the same time meeting the demands of experienced web developers.
5. Advantages of Django
Here are few advantages of using Django which can be listed out here −
6. Django Overview
As you already know, Django is a Python web framework. And like most
modern framework, Django supports the MVC pattern. First let's see
what is the Model-View-Controller (MVC) pattern, and then we will look
at Django’s specificity for the Model-View-Template (MVT) pattern.
7. Features of Django
o Rapid Development
10
o Secure
o Scalable
o Fully loaded
o Versatile
o Open Source
o Vast and Supported Community
7.2 Secure
Django takes security seriously and helps developers to avoid
many common security mistakes, such as SQL injection, cross-site
scripting, cross-site request forgery etc. Its user authentication
system provides a secure way to manage user accounts and
passwords.
7.3 Scalable
Django is scalable in nature and has ability to quickly and flexibly
switch from small to large scale application project.
11
7.5 Versatile
Django is versatile in nature which allows it to build applications
for different-different domains. Now a days, Companies are using
Django to build various types of applications like: content
management systems, social networks sites or scientific
computing platforms etc.
class ClassName:
# Statement-1
.
.
.
# Statement-N
15
Polymorphism in Python
This code demonstrates the concept of inheritance and method
overriding in Python classes. It shows how subclasses can
override methods defined in their parent class to provide specific
behavior while still inheriting other methods from the parent
class.
17
12. Conclusion
The Django framework gives us a simple and reliable way to create the
course management system. It provides powerful functionalities and
concise syntax to help programmers deal with the database, the web
page and the inner logic. The experience of developing the group
component in the system also helped me learning a lot of website
development with Django. Within the Django framework, we have
successfully accomplished the requirements of the system. Once this
system passes the testing phase, it can be used to serve students and
instructors and substitute several systems currently in service. It will
make the work for instructors to manage the course much easier. It
also can simplify the operations for students with grade book,
submission, and group management all in one system. In short, this
system will bring great user experience to both instructors and
students. The only limitation for this course system is that although the
developers have been testing it with various use cases, it may still
encounter problems during real time use. However, even if that
happens, the flexibility of Django would provide a simple way to fix the
problem, as well as add new features into the system.