How To Make A Django Video Sharing App

*This post doesn't have a lot of support, so there probably we won't be a part 2. I have the code, and i could make an article, if this gets more likes. If you guys would like to see a part 2, like this post or follow me. 

Part 1 - Installation

Hello friends, today I will be sharing with you guys how you can start making a django video sharing app right from today! For those of you who don't know what django is, according to MDN, Django is a...

Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. ... Django can be (and has been) used to build almost any type of website — from content management systems and wikis, through to social networks and news sites.

Basically django is this cool web-development framework, (like flask), that uses python and html. Anyways, enough intro let's get started!

What You Will Need:

  • A Computer
  • Python Installed (Most Already Have It)
  • Django
  • An Software IDE
  • A Brain
  • Time

First, we need to check if python is installed. Python is probably already installed on your system, so you can skip this.

If You Just Want To Check:

   Check & Install:

   - Mac: To check if it’s installed, go to Applications > Utilities and click on Terminal. (You can also press command-spacebar, type terminal, and then press Enter.). Then in the terminal type in:

python --version

    You should get the result of it saying "Python" and then a number for the version. If you do not get this, then you have to install it. Go here to learn how to install it.

     - WindowsTo check if it’s installed, go to Startand search for Command Prompt. (You can also press command-spacebar, type terminal, and then press Enter.). Then in the terminal type in:

python --version

      You should get the result of it saying "Python" and then a number for the version. If you do not get this, then you have to install it. Go here to learn how to install it.

Now we need to install an IDE:

But first... What is an IDE?

An IDE stands for integrated development environment. Basically it is a place where you can write and run code. There are many different IDE's. Personally, my favorite is Pycharm, and to install it, just go here.

Also, in this tutorial, we will be using the terminal. If you are using pycharm, then in the bottom right it should say "Terminal", and you can click on that and open one up. If you are not using pycharm, just open up the terminal, which you can access by using the app Terminal (Mac) or Command Prompt (Windows).

Now Let's Being The Coding!

But first we need to install django. Open up the Terminal. We will need pip, so you can install it from here, and check if you have it install from here.

You'll also need a virtual enviroment. Pycharm will auto make one, but if you are not using this IDE, check out this tutorial.

Once you have installed pip and have a virtual enviorment, run this command in the terminal:

python -m pip install Django

This will install dajngo and we can get started. 

Setting Up Our Website

From the command line, cd into a directory where you’d like to store your code, then run the following command:

django-admin startproject video_app

This will create a video_app directory in your current directory. If it didn’t work, see Problems running django-admin.

Let’s look at what startproject created:


These files are:

  • The outer video_app/ root directory is a container for your project. Its name doesn’t matter to Django; you can rename it to anything you like.
  • A command-line utility that lets you interact with this Django project in various ways. You can read all the details in django-admin and
  • The inner video_app/ directory is the actual Python package for your project. Its name is the Python package name you’ll need to use to import anything inside it (e.g. mysite.urls).
  • video_app/ An empty file that tells Python that this directory should be considered a Python package. If you’re a Python beginner, read more about packages in the official Python docs.
  • video_app/ Settings/configuration for this Django project.  Django settings will tell you all about how settings work.
  • video_app/ The URL declarations for this Django project; a “table of contents” of your Django-powered site. You can read more about URLs in URL dispatcher.
  • video_app/ An entry-point for ASGI-compatible web servers to serve your project. See How to deploy with ASGI for more details.
  • video_app/ An entry-point for WSGI-compatible web servers to serve your project. See How to deploy with WSGI for more details.

Now move into the directory. Type this in your command line:

cd video_app/

We need to know create the tables and columns for our admin site. Run this command:

python makemigrations

And then run:

python migrate

Now to test if it is all working correctly, go to the command line and type in:

python runserver

You should get some text saying Running on Full message:

Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python migrate' to apply them.

June 22, 2021 - 15:50:53
Django version 3.2, using settings 'mysite.settings'
Starting development server at
Quit the server with CONTROL-C.

Go to the url and you should see this message: 

This means it all worked and it was a success the installation of Django. 

If you did not get this message and you had some error while following this tutorial, please consult the documentation to debug your problem.

Our file structure thus far is this:


Part 2 - Basic Setup 

When using Django, we make these small apps which each can have a different task. What we have made thus far is a project. According to Django, the difference between a project and app is:

An app is a Web application that does something – e.g., a Weblog system, a database of public records or a small poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects.

To make an app, go to your terminal and type in:

python startapp video

This should create a file like this:


This directory will host our video sharing site. Now let's test if everything is working and setup our first view in Django. Open the file video/ and in it add this Python code:

from django.http import HttpResponse

def index(request):
    return HttpResponse("Hello, world. You're at the video index.")

This is the simplest view possible in Django. To call the view, we need to map it to a URL - and for this we need a URLconf. To create a URLconf, make a python file in the video/ directory and name it Our file tree should look like this:


In the newly created file, add this code:

from django.urls import path

from . import views

urlpatterns = [
    path('', views.index, name='index'),

The next step is to point the root URLconf at the video.urls module. In video_app/, add an import for django.urls.include and insert an include() in the urlpatterns list, so you have:

from django.contrib import admin
from django.urls import include, path

urlpatterns = [
    path('', include('video.urls')),

The include() function allows referencing other URLconfs. Whenever Django encounters include(), it chops off whatever part of the URL matched up to that point and sends the remaining string to the included URLconf for further processing. The idea behind include() is to make it easy to plug-and-play URLs. Since polls are in their own URLconf (video/, they can be placed under “/”, or under “/videos/”, or under “/content/videos/”, or any other path root, and the app will still work. 

You have now wired an index view into the URLconf. Verify it’s working with the following command:

python runserver

Go to and if all is good, you should see the text “Hello, world. You’re at the video index.”, which you defined in the index view.

As always, ask in the comments for any questions or if you find and mistakes, and part 2 is right around the corner, so be sure to smash that follow button so you get notified when it does come. I've been your host, Dheirya Tyagi, signing off for another day. That means goodbye. :)

Login For More Features

So you can create and connect with what matters to you.

More From Dheirya_Tyagi_CEO

Trending Posts

School Memes | September 24, 2021 | 21156 views
Hello my name is Alexzander Mcrunkernoodle. My Goofy-Ahh-Friend Edward Egbert tried to kidnap my son | May 20, 2022 | 13153 views
Cool Images | May 24, 2022 | 5882 views
Top 5 Netflix Shows For Kids | July 11, 2021 | 3513 views
How To Make A Django Video Sharing App | June 29, 2021 | 3510 views

Quick Settings

Top Users

Dheirya_Tyagi_CEO | 2717 Reputation
Trxp_Cxrp | 2067 Reputation
Bendy | 1579 Reputation
ajh | 1395 Reputation
Eklavya_Tyagi | 1056 Reputation

Precipitation: %
Wind: mph
Weather data updates every 6 hours.


Not a category you like? Create one.

Sports | March 16, 2021 | 18 followers | 5 posts

Talk about sports in this category!

Lifestyle | March 16, 2021 | 16 followers | 12 posts

Talk about lifestyle in this category!

Political | March 16, 2021 | 12 followers | 5 posts

Talk about political issues in this category!

Travel | March 16, 2021 | 8 followers | 4 posts

Talk about travel in this category!

Fashion | March 16, 2021 | 14 followers | 3 posts

Talk about fashion in this category!

Education | March 16, 2021 | 11 followers | 19 posts

Talk about education in this category!

Music | March 16, 2021 | 16 followers | 7 posts

Talk about music in this category!

News | March 16, 2021 | 11 followers | 19 posts

Talk about news in this category!

Personal | March 16, 2021 | 16 followers | 19 posts

Talk about personal topics in this category.

Not displaying all categories. See all categories.