Skip to main content

Introduction to Django

Hello everyone, from today we’re going to start a new tutorial series on Django framework. In this tutorial we will cover basic introduction of Django. Before start to learn, lets have a look on some most frequently asked questions about Django. These questions will help you to understand that what actually Django is.

  1. What is Django?
  2. Why use Django?
  3. How does Django work?
  4. Is Django stable?
  5. What are the requirements to learn Django?

So let’s answer these questions one by one.

Introduction to Django

Image Source

Introduction to Django

What is Django?

Django is open-source and free web framework. It is written in Python language. It was created about 13 years ago (21 july 2005) and the latest and stable release Django 2.1 is out this year (1 august 2018) with a whole new set of features and capabilities. It is maintained by the Django Software Foundation, an independent organization established as a 501 non-profit. Django is a framework for web developers, it provides amazing infrastructure required for database-driven websites that have user authentication, content administration, file uploads, and much more.

We doesn’t have to create all these features from sratch, we can use Django framework and utilize these components that are already built-in there, so we can save a lot of time by using these inbuilt components. If you love to working  with python, especially for web application or web design, then you should learn the Django framework.

Why use Django?

We already have seen that how it saves a lot of time for us. There are some another reasons to use Django framework.

  1. Components: It is a light weight and stand alone web server where we can develop and test our project, a template system that uses the concept of inheritance from OOP, supports caching the data into memory, supports middleware framework (a light and low level plugin which is a system for altering input and output of django), consists of an object-relational mapper (ORM) that mediates between python classes and a relational database and many other components are there.
  2. Bundled Applications: Django also includes a number of applications in its contrib package like – dynamic admin interface, an extensible authentication system that follows EAP (extensible authentication protocol), tools for creating Atom (web feeds) and RSS, tools for producing google sitemaps, a site’s framework which allows us to install django only once and run more than one websites, having different contents, inbuilt tool to reduce cross-site scripting, cross-site request forgery, SQL injection, cracking password and mitigate other web attacks.
  3. Extensibility: Django allows us plug the third party code into a regular project, so that it can be re-used. There are around 2500 packages to extend the framework’s original behavior.

There are many other reasons to use Django framework, which will you know while learning it.

How does Django work?

It can be broken into several components like Models.py, URL.py, Views.py files. Each file have their own specification like Models.py defines our data model by extending your single code line into full database tables and add a pre-built administration section to manage content, while on other hand Views.py is the main part of Django. Actual processing happens in view. We’ll discuss it later in detail.

Is Django stable?

Of course, Django is stable. Most of the companies are using it. Some of them are:

  • Bitbucket
  • Instagram
  • Pinterest
  • Mahalo
  • The washington post’s webstite

What are the requirements to learn Django?

You should be familiar with basic syntax of Python, functions, importing external modules, conditional operator, loops, Regular Expression, data structure like tuple, set and dictionary, and a computer to work with.

That’s all for this article, if you have any problem or question related to introduction to Django then comment below, we’ll reply as soon as possible.

The post Introduction to Django appeared first on The Crazy Programmer.



from The Crazy Programmer https://www.thecrazyprogrammer.com/2018/08/introduction-to-django.html

Comments

Popular posts from this blog

Rail Fence Cipher Program in C and C++[Encryption & Decryption]

Here you will get rail fence cipher program in C and C++ for encryption and decryption. It is a kind of transposition cipher which is also known as zigzag cipher. Below is an example. Here Key = 3. For encryption we write the message diagonally in zigzag form in a matrix having total rows = key and total columns = message length. Then read the matrix row wise horizontally to get encrypted message. Rail Fence Cipher Program in C #include<stdio.h> #include<string.h> void encryptMsg(char msg[], int key){ int msgLen = strlen(msg), i, j, k = -1, row = 0, col = 0; char railMatrix[key][msgLen]; for(i = 0; i < key; ++i) for(j = 0; j < msgLen; ++j) railMatrix[i][j] = '\n'; for(i = 0; i < msgLen; ++i){ railMatrix[row][col++] = msg[i]; if(row == 0 || row == key-1) k= k * (-1); row = row + k; } printf("\nEncrypted Message: "); for(i = 0; i < key; ++i) f...

Data Encryption Standard (DES) Algorithm

Data Encryption Standard is a symmetric-key algorithm for the encrypting the data. It comes under block cipher algorithm which follows Feistel structure. Here is the block diagram of Data Encryption Standard. Fig1: DES Algorithm Block Diagram [Image Source: Cryptography and Network Security Principles and Practices 4 th Ed by William Stallings] Explanation for above diagram: Each character of plain text converted into binary format. Every time we take 64 bits from that and give as input to DES algorithm, then it processed through 16 rounds and then converted to cipher text. Initial Permutation: 64 bit plain text goes under initial permutation and then given to round 1. Since initial permutation step receiving 64 bits, it contains an 1×64 matrix which contains numbers from 1 to 64 but in shuffled order. After that, we arrange our original 64 bit text in the order mentioned in that matrix. [You can see the matrix in below code] After initial permutation, 64 bit text passed throug...

Experimental: Reducing the size of .NET Core applications with Mono's Linker

The .NET team has built a linker to reduce the size of .NET Core applications. It is built on top of the excellent and battle-tested mono linker . The Xamarin tools also use this linker so it makes sense to try it out and perhaps use it everywhere! "In trivial cases, the linker can reduce the size of applications by 50%. The size wins may be more favorable or more moderate for larger applications. The linker removes code in your application and dependent libraries that are not reached by any code paths. It is effectively an application-specific dead code analysis ." - Using the .NET IL Linker I recently updated a 15 year old .NET 1.1 application to cross-platform .NET Core 2.0 so I thought I'd try this experimental linker on it and see the results. The linker is a tool one can use to only ship the minimal possible IL code and metadata that a set of programs might require to run as opposed to the full libraries. It is used by the various Xamarin products to extract...