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

is it just me or does 2/3 of people use this plat… | March 28, 2024 | 150 views
why the **** is there posts about... special dolls | April 02, 2024 | 55 views It's out! I'm now self-hos… | March 25, 2024 | 97 views
Solar Eclipse Day! | April 08, 2024 | 57 views
bruh | April 06, 2024 | 74 views

Quick Settings

Top Users

Dheirya_Tyagi_CEO | 3706 Reputation
Trxp_Crzxp | 2454 Reputation
Bendy | 2090 Reputation
kz | 1951 Reputation
Eklavya_Tyagi | 1215 Reputation

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


Not a category you like? Create one.

Sports | 18 followers | 6 posts

Talk about sports in this category!

Lifestyle | 18 followers | 13 posts

Talk about lifestyle in this category!

Political | 14 followers | 5 posts

Talk about political issues in this category!

Travel | 10 followers | 4 posts

Talk about travel in this category!

Fashion | 16 followers | 4 posts

Talk about fashion in this category!

Education | 15 followers | 23 posts

Talk about education in this category!

Music | 19 followers | 7 posts

Talk about music in this category!

News | 13 followers | 22 posts

Talk about news in this category!

Personal | 18 followers | 21 posts

Talk about personal topics in this category.

Not displaying all categories. See all categories.