Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6929531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:19:48+00:00 2026-05-27T11:19:48+00:00

i have uploaded a video to django and it’s all working fine .. but

  • 0

i have uploaded a video to django and it’s all working fine ..
but i need to render that video in the view..
django cant access it
any idea how to make django template see my uploaded files

modles.py :

class VideoData(models.Model):

    title = models.CharField(max_length=200)
    file = models.FileField(upload_to='vids'  )

forms.py :

class UploadFileForm(forms.Form):
    title = forms.CharField(max_length=50)
    file  = forms.FileField()

and in template.html:

<video width="320" height="240" controls="controls">
  <source src="vids/name.mov"  type="video/mov" />
 </video>

it shows an empty video player.

am i doing anything wrong ?

please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:19:49+00:00Added an answer on May 27, 2026 at 11:19 am

    Assuming an instance of VideoData named vid is in the template’s context, you should use:

    <video width="320" height="240" controls="controls">
      <source src="{{vid.file.url}}"  type="video/mov" />
     </video>
    

    To add the VideoData instance to the template’s context, your view should look like this:

    from django.shortcuts import render_to_response
    from models import VideoData
    
    def show_video(request):
        vid = VideoData.objects.get(id=1) # replace with correct query
        return render_to_response("template.html", {"vid":vid})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
I have uploaded 1 video to my YouTube channel. Everything works fine when I
what's the problem there, I have uploaded this video to server, but now its
I need to upload video files through Facebook application and later visualize all uploaded
I want to convert and show video that user uploaded. I have dedicated server
i have uploaded an app yesterday by 6pm but till now i can't find
I need to add a user uploaded video section to my site. There'll plenty
I have created a S3 bucket, uploaded a video, created a streaming distribution in
I have just installed ffmpeg and I am trying to encode all my uploaded
I need to fetch videos uploaded by users to a Facebook Page. I'd have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.