Upload video

Hello
I hope you are well
I want to upload a video via the form with the description description
My form is htmlform

url

from django.urls import path
from .views import SignupView,LoginView,LogoutView,showPage,showUpload,saveUpload
from django.conf import settings
from django.conf.urls.static import static

app_name = 'accounts'
urlpatterns = [
    path('signup/',SignupView,name='signup'),
    path('login/',LoginView,name='signup'),
    path('logout/',LogoutView,name='logout'),
    path('upload/',saveUpload,name='upload'),
    path('upload-list/',showUpload,name='listUpload'),
    path('',showPage),

]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

model
from django.db import models

Create your models here.

class UploadModel(models.Model):
file = models.FileField(upload_to=‘media/%y’)
caption = models.CharField(max_length=100)
description = models.CharField(max_length=200)

Thankful

What is your question here? Are you getting some kind of error or having a problem?

When you say:

Are you saying that you created a full html page for this and are not using a Django form rendered in a template?
If so, then that’s the first thing you want to change. Creating a Django form is going to make everything else a lot easier.