<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Priyanshu Panwar</title>
    <description>The latest articles on Forem by Priyanshu Panwar (@priyanshupanwar).</description>
    <link>https://forem.com/priyanshupanwar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F416673%2Fe0c1e5b4-d90d-4a31-8ac9-d16b3fedbd9d.jpeg</url>
      <title>Forem: Priyanshu Panwar</title>
      <link>https://forem.com/priyanshupanwar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/priyanshupanwar"/>
    <language>en</language>
    <item>
      <title>Django 2.x V/S Django 3.x</title>
      <dc:creator>Priyanshu Panwar</dc:creator>
      <pubDate>Mon, 08 Nov 2021 11:10:07 +0000</pubDate>
      <link>https://forem.com/priyanshupanwar/django-2x-vs-django-3x-18e5</link>
      <guid>https://forem.com/priyanshupanwar/django-2x-vs-django-3x-18e5</guid>
      <description>&lt;p&gt;In this article, we'll talk about the new features added to Django 3.x and their differences, though Django 2.2.x still has a Long Term Support. (I still use Django 2.2.6)&lt;br&gt;
Before we start, &lt;strong&gt;Both Django versions work very well with Python 3.x&lt;/strong&gt;, though one might feel some problem with some libraries in Django 2.x for python 3.6+(in rare libraries).&lt;/p&gt;
&lt;h2&gt;
  
  
  New Features added in Django 3.x
&lt;/h2&gt;
&lt;h3&gt;
  
  
  MARIA DB
&lt;/h3&gt;

&lt;p&gt;Django 3.x comes in support with Maria DB. This might not effect most of the django programmers but for those who are fans of this open source MYSQL database. &lt;br&gt;
This is how you can use MariaDB in your django project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# settings.py
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'OPTIONS': {
            'read_default_file': '/path/to/my.cnf',
        },
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# my.cnf
[client]
database = NAME
user = USER
password = PASSWORD
default-character-set = utf8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ASGI in Django - Biggest Upgrade of 3.x
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Django 3.0 is now &lt;strong&gt;fully async-capable&lt;/strong&gt;, it provides support for running as an ASGI application in addition to the existing WSGI support.&lt;/li&gt;
&lt;li&gt;ASGI (Asynchronous Server Gateway Interface) is a spiritual successor of WSGI, intended to provide a standard interface between async-capable Python web servers, frameworks and applications.
Let's take a simple example to see the working of async python in django.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async def application(scope, receive, send):
    event = await receive()
    ...
    await send({"type": "websocket.send", ...})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These two features are the main upgrades in the Django 3.0&lt;br&gt;
If you are looking to work with MariaDB or want to use the power of async python, then definitely upgrade to Django 3.0&lt;/p&gt;

&lt;h2&gt;
  
  
  THANK YOU
&lt;/h2&gt;

&lt;p&gt;Feel Free to ask me anything in comments or reach out to me directly. &lt;a href="http://priyanshu-panwar.github.io/"&gt;Priyanshu Panwar&lt;/a&gt; | &lt;a href="https://www.linkedin.com/in/priyanshu-panwar"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Everything About Django - 3 (Models and Migrations)</title>
      <dc:creator>Priyanshu Panwar</dc:creator>
      <pubDate>Mon, 08 Nov 2021 07:03:26 +0000</pubDate>
      <link>https://forem.com/priyanshupanwar/everything-about-django-3-models-and-migrations-4660</link>
      <guid>https://forem.com/priyanshupanwar/everything-about-django-3-models-and-migrations-4660</guid>
      <description>&lt;p&gt;This is the &lt;strong&gt;third blog&lt;/strong&gt; of the series &lt;strong&gt;Everything About Django&lt;/strong&gt;. In this article we are going to study about &lt;strong&gt;Models&lt;/strong&gt; and &lt;strong&gt;Migrations&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Models?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Models are the database tables.&lt;/li&gt;
&lt;li&gt;Django uses ORM (Object Relational Mapping) for models.&lt;/li&gt;
&lt;li&gt;Each model is a subclass inherited from &lt;code&gt;django.db.models.Model&lt;/code&gt; class.&lt;/li&gt;
&lt;li&gt;Every attribute in Django Model specifies a field in the database table.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is ORM?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;ORM means Object Relational Mapper, one of the most powerful feature of Django.&lt;/li&gt;
&lt;li&gt;Django's ORM is just a pythonical way to create SQL to query and manipulate your database and get results in a pythonic fashion.&lt;/li&gt;
&lt;li&gt;How wonderful this is, you need not type SQL and do all the db stuff.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to create a model?
&lt;/h2&gt;

&lt;p&gt;Let's take an example to see how a model is made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db import models
class Student(models.Model):
    name = models.CharField(max_length=100)
    roll = models.IntegerField()
    address = models.CharField(max_length=200)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way I have created a table Student with the following attributes : name - Char, roll - Integer, address - Char.&lt;br&gt;
In SQL we do this by :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE Student
(
roll int,
name varchar(100),
address varchar(200)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So you see how easy and pythonic this is with Django.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a migration?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Once we have defined a model, it's just a python code not yet reflected in our database, no table is created so far, until we migrate this to our database.&lt;/li&gt;
&lt;li&gt;Once our models is defined, we need to run &lt;code&gt;python manage.py makemigrations&lt;/code&gt;. See the example bro.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fll3m8xslaqsknar7kpcq.png" alt="makemigrations"&gt;
&lt;/li&gt;
&lt;li&gt;Here core is the app in which my models is defined. It creates a folder in my app &lt;code&gt;migrations&lt;/code&gt;.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffph7sm29z6vypjbqn59i.png" alt="migrations"&gt;
&lt;/li&gt;
&lt;li&gt;With every makemigrations, a file is created like &lt;code&gt;0001_initial.py&lt;/code&gt; which contains the information about our reflected changes in the database, which looks like this.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcm1yyxjki16yuyqza18q.png" alt="0001_initial.py"&gt;
This is a internal file created by django to reflect changes in the db.&lt;/li&gt;
&lt;li&gt;Once we have made migrations, we need to actually reflect them in the database to create and modify the table. For this run, &lt;code&gt;python manage.py migrate&lt;/code&gt;. This command will run the latest migrations made and reflect their changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I will create an article on tips while creating a model, where I will define all the attributes, functions one should define in a model.&lt;/p&gt;

&lt;h2&gt;
  
  
  THANK YOU
&lt;/h2&gt;

&lt;p&gt;You can find me on : &lt;a href="http://priyanshu-panwar.github.io/" rel="noopener noreferrer"&gt;Priyanshu Panwar&lt;/a&gt; | &lt;a href="https://www.linkedin.com/in/priyanshu-panwar" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please feel free to comment for any help or topic I should write an article on.&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Playing with Django Model Objects - CheatSheet</title>
      <dc:creator>Priyanshu Panwar</dc:creator>
      <pubDate>Sun, 07 Nov 2021 17:18:40 +0000</pubDate>
      <link>https://forem.com/priyanshupanwar/playing-with-django-model-objects-cheatsheet-g6k</link>
      <guid>https://forem.com/priyanshupanwar/playing-with-django-model-objects-cheatsheet-g6k</guid>
      <description>&lt;p&gt;One must know how to play with Django models in their views in order to create efficient and short functions.&lt;/p&gt;

&lt;p&gt;Let's take a model for example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Teacher(models.Model):
    name = models.CharField(max_length=100)

class Student(models.Model):
    name = models.CharField(max_length=100)
    roll = models.CharField(max_length=100)
    mentor = models.ForeignKey(Teacher, on_delete=models.CASCADE)
    reg_date = models.DateTimeField(auto_add_now=True)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Extracting all objects of a model
&lt;/h3&gt;

&lt;p&gt;Let's extract all the students.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;students = Student.objects.all()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Extracting a student by ID
&lt;/h3&gt;

&lt;p&gt;ID is the primary key in every model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.shortcuts import get_object_or_404

def my_view(request):
    obj = get_object_or_404(MyModel, pk=1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or there is another way to do this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stud = Student.objects.get(pk=1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last one returns a error in case a student doesn't exist with the following id.&lt;/p&gt;

&lt;h3&gt;
  
  
  Filtering the objects
&lt;/h3&gt;

&lt;p&gt;Simple filtering can be done with equating like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;studs = Student.objects.filter(name='Ram Kapoor')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return the list of students whose name is Ram Kapoor.&lt;br&gt;
We can also refer to the details of an attribute with the symbol &lt;code&gt;__&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stud_2006 = Student.objects.filter(reg_date__year=2006)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return all the students registered in 2006.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stud_p = Student.objects.filter(name__startswith='P')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return all the students whose names start with 'P'.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Q() - Very Powerful
&lt;/h3&gt;

&lt;p&gt;This is used to add many filters in a single filter using | (or), &amp;amp; (and).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stud = Student.objects.filter(Q(name__startswith='P') | Q(reg_date__year=2006))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return both the students whose names start with 'P' or who are registered in year 2006.&lt;/p&gt;

&lt;h2&gt;
  
  
  THANK YOU
&lt;/h2&gt;

&lt;p&gt;Find me on &lt;a href="http://priyanshu-panwar.github.io/"&gt;Priyanshu Panwar&lt;/a&gt; | &lt;a href="https://www.linkedin.com/in/priyanshu-panwar"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Everything About Django - 2 (Architecture of Django)</title>
      <dc:creator>Priyanshu Panwar</dc:creator>
      <pubDate>Sun, 07 Nov 2021 10:28:05 +0000</pubDate>
      <link>https://forem.com/priyanshupanwar/everything-about-django-2-architecture-of-django-2o6c</link>
      <guid>https://forem.com/priyanshupanwar/everything-about-django-2-architecture-of-django-2o6c</guid>
      <description>&lt;p&gt;This is the &lt;strong&gt;second blog&lt;/strong&gt; of my series &lt;strong&gt;Everything About Django&lt;/strong&gt;. You can read my previous article &lt;a href="https://dev.to/priyanshupanwar/everything-about-django-1-how-to-start-25ai"&gt;here&lt;/a&gt;.&lt;br&gt;
In this article, we are going to learn the &lt;strong&gt;core architecture of Django, how Django works&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture of Django
&lt;/h2&gt;

&lt;p&gt;Django follows the architecture &lt;strong&gt;MVT - Model View Template&lt;/strong&gt;.&lt;br&gt;
Let's break the MVT architecture :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model : This is the &lt;strong&gt;database layer&lt;/strong&gt; of the architecture. Model means the tables stored in the database. Django follows the &lt;strong&gt;ORM (Object Relational Mapping)&lt;/strong&gt; Protocol by which we can write the database commands in pythonic way without any SQL. We will study this in detail in coming blog.&lt;/li&gt;
&lt;li&gt;View : This is the &lt;strong&gt;logical layer&lt;/strong&gt; of the architecture. This is where we write the logic of our project. We create functions/classes which are mapped to different URL Patterns of our site (project). &lt;/li&gt;
&lt;li&gt;Template : This is the &lt;strong&gt;display layer&lt;/strong&gt; of the architecture. This contains the html files that are rendered(displayed) on our web interface. Every view(function/class) sends a template or a http response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's take a look at this picture for clear understanding.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabvbys3c58tmswhw6vbj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabvbys3c58tmswhw6vbj.jpg" alt="MVT Pattern"&gt;&lt;/a&gt;&lt;br&gt;
Let's drop this into few points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A user opens a &lt;strong&gt;specific url&lt;/strong&gt; of our site (project) suppose &lt;a href="http://localhost:8000/login" rel="noopener noreferrer"&gt;http://localhost:8000/login&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Django maps this url to the &lt;strong&gt;specific view&lt;/strong&gt; (function) which implements the logic for this url.&lt;/li&gt;
&lt;li&gt;The view takes the data from &lt;strong&gt;associated models&lt;/strong&gt; (database) and &lt;strong&gt;sends a template&lt;/strong&gt; which is rendered on the web interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope the MVT architecture of Django is clear. Feel free to comment your doubts.&lt;/p&gt;

&lt;h2&gt;
  
  
  THANK YOU
&lt;/h2&gt;

&lt;p&gt;You can find me at : &lt;a href="http://priyanshu-panwar.github.io/" rel="noopener noreferrer"&gt;My Portfolio&lt;/a&gt; | &lt;a href="https://www.linkedin.com/in/priyanshu-panwar" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>python</category>
    </item>
    <item>
      <title>Everything About Django - 1 (How To Start)</title>
      <dc:creator>Priyanshu Panwar</dc:creator>
      <pubDate>Sat, 06 Nov 2021 16:53:31 +0000</pubDate>
      <link>https://forem.com/priyanshupanwar/everything-about-django-1-how-to-start-25ai</link>
      <guid>https://forem.com/priyanshupanwar/everything-about-django-1-how-to-start-25ai</guid>
      <description>&lt;p&gt;This is the &lt;strong&gt;first blog&lt;/strong&gt; of the series &lt;strong&gt;Everything About Django&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prerequisite
&lt;/h4&gt;

&lt;p&gt;Just Install Python3 in your system along with pip.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Django?
&lt;/h2&gt;

&lt;p&gt;Django is a full stack open source web framework built on top of Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to setup Virtual Environment?
&lt;/h2&gt;

&lt;p&gt;A virtual environment is a Python environment such that the Python interpreter, libraries and scripts installed into it are isolated from those installed in other virtual environments, and the whole system. With virtual environment, you can seperate all the packages and requirements you need for each project. It works in a similar way to package.json in Javascript.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install pipenv using pip
&lt;code&gt;pip install pipenv&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a folder &lt;code&gt;dev&lt;/code&gt; and open command prompt inside it.&lt;/li&gt;
&lt;li&gt;Create a virtualenv with pipenv 
&lt;code&gt;pipenv install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;pipenv shell&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;This activates our virtual environment.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;pip freeze&lt;/code&gt; to check the libraries installed. It will give no result as no python libraries are installed in this environment yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install Django
&lt;/h2&gt;

&lt;p&gt;We will be using Django 2.2.6 (3 can also be used).&lt;br&gt;
&lt;code&gt;pip install django==2.2.6&lt;/code&gt;&lt;br&gt;
This installs our Django.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Django Project
&lt;/h2&gt;

&lt;p&gt;We will create a django project named Beginner.&lt;br&gt;
Once our django is installed, we get access to &lt;code&gt;django-admin&lt;/code&gt; which is a django administrator with which we initialize our new project.&lt;br&gt;
Type in the same command prompt : &lt;code&gt;django-admin startproject Beginner&lt;/code&gt;&lt;br&gt;
This creates our new Django project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Django Project Created
&lt;/h2&gt;

&lt;p&gt;This is our Django Project created. Let's look at the files.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl14r7i8v20lads9hwc0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl14r7i8v20lads9hwc0.png" alt="Django File Structure"&gt;&lt;/a&gt;&lt;br&gt;
Inside our parent &lt;code&gt;Beginner&lt;/code&gt; Folder, we have the following structure :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Beginner&lt;/code&gt; Folder : This folder has the same name as our Parent folder(Project Name). It contains all the settings and configurations of the whole project.

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;__init__.py&lt;/code&gt; : This file tells the interpreter that it's a python project.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;settings.py&lt;/code&gt; : This file contains all the configurations of this project like &lt;code&gt;SECRET_KEY&lt;/code&gt;, &lt;code&gt;ALLOWED_HOSTS&lt;/code&gt;, &lt;code&gt;INSTALLED_APPS&lt;/code&gt;, &lt;code&gt;MIDDLEWARES&lt;/code&gt;, 'STATIC FILES CONFIG`, etc. We will discuss about all of this in detail in a seperate blog.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;urls.py&lt;/code&gt; : This file contains the root level url configurations. When we run our project, all the urls are checked and matched from this file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wsgi.py&lt;/code&gt; : This file is the entry point of our project for the web servers during deployment. This file actually connects the web server with our django project. From Django 3.0, we also have &lt;code&gt;asgi.py&lt;/code&gt; file. ASGI is the successor of WSGI which would need a seperate blog for discussion.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;code&gt;manage.py&lt;/code&gt; : This python file is located at the root directory. This is same as &lt;code&gt;django-admin&lt;/code&gt;. It works like a django administrator but only works for the current project. We can control the whole project with this command like &lt;code&gt;python manage.py runserver&lt;/code&gt; - We can run this file by giving instructions with it like &lt;code&gt;runserver&lt;/code&gt;, &lt;code&gt;createsuperuser&lt;/code&gt;, etc.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Run my Project?
&lt;/h2&gt;

&lt;p&gt;Let's go to our same command prompt and go inside the Beginner folder &lt;code&gt;cd Beginner&lt;/code&gt; and type : &lt;code&gt;python manage.py runserver&lt;/code&gt;. This runs our django project on our system's localhost at port 8000: &lt;a href="http://localhost:8000/" rel="noopener noreferrer"&gt;http://localhost:8000/&lt;/a&gt;&lt;br&gt;
This is what our command prompt shows : &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6aen837mho72kfsfrb8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa6aen837mho72kfsfrb8.png" alt="Command Prompt"&gt;&lt;/a&gt;&lt;br&gt;
We have 17 unapplied migrations which we'll discuss in our next blog.&lt;br&gt;
Let's go to the localhost url at 8000 port and test if our project runs.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8fcq24zkj7ygbnx9b35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8fcq24zkj7ygbnx9b35.png" alt="Django Project"&gt;&lt;/a&gt;&lt;br&gt;
If we see this template on the screen, our project is working and properly configured. We can start working on it now.&lt;/p&gt;

&lt;h2&gt;
  
  
  THANK YOU
&lt;/h2&gt;

&lt;p&gt;You can find me at : &lt;a href="https://priyanshu-panwar.github.io/" rel="noopener noreferrer"&gt;My Portfolio&lt;/a&gt; | &lt;a href="https://www.linkedin.com/in/priyanshu-panwar" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>python</category>
    </item>
  </channel>
</rss>
