Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
Django is a free and open-source web framework based on Python that follows the model–template–views architecture and allows for the quick creation of safe and maintainable websites. Furthermore, Django is adaptable and can be used to build any website, such as a content management system, while also preventing numerous security blunders by offering vulnerability prevention. Additionally, it is portable and does not bind developers to a certain server platform.
In this tutorial, we'll look at how to make a Django project. So, let's begin creating our first Django project.
Creating an App in Django
Today, we'll make a todo app to learn the fundamentals of Django. This web app allows users to write notes similar to Google Keep or Evernote.
Setup
Make sure you have Django installed and your basic setup is complete before proceeding with the next instructions. If you haven't installed Django, then read the following blog about Django Basics for building a project in Django.
from django.db import models
from django.utils import timezone
class Todo(models.Model):
title = models.CharField(max_length=100)
details = models.TextField()
date = models.DateTimeField(default=timezone.now)
def __str__(self):
return self.title
You can also try this code with Online Python Compiler
What are the advantages of Django? Implemented in Python, Better CDN connectivity and Content Management, Batteries Included Framework, Fast Processing.,Offers Rapid-development, Scalable, Security.
What are the disadvantages of Django? No conventions, Most programmers dislike Django web development because of the lack of conventions, Not for smaller projects, Monolithic framework, Steep learning curve, Multiple request issues.
Key Takeaways
Cheers if you reached here! In this blog, we learned to develop a simple todo app using Django.
This app helped us learn several Django fundamentals and gave a basic idea of this python framework.
This is not it to Django instead it's a mere beginning to the framework. The Django framework is an excellent location for novice Python web developers to start because the official documentation and tutorials are among the finest in the field.