From 6bf236ff15c611bf0b9982878eec884381e57e9a Mon Sep 17 00:00:00 2001 From: prashantmitts Date: Sun, 6 Aug 2017 21:07:12 +0530 Subject: [PATCH 1/3] video db added with video playing video playing issue pesists --- mooc/models.py | 6 ++++-- mooc/templates/mooc/topic.html | 8 ++++++++ mooc/views.py | 21 ++++++++++++++------- mooc_chatbot/settings.py | 2 ++ 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/mooc/models.py b/mooc/models.py index 23248f2..6058f9f 100644 --- a/mooc/models.py +++ b/mooc/models.py @@ -1,7 +1,9 @@ from django.db import models # Create your models here. + + class Topic(models.Model): content = models.CharField(max_length=10000) - title = models.CharField(max_length=40, default='Title') - + title = models.CharField(max_length=40, default='Title') + video_dir = models.FileField(upload_to='videos/', default="video") diff --git a/mooc/templates/mooc/topic.html b/mooc/templates/mooc/topic.html index 8ffa702..5e67f89 100644 --- a/mooc/templates/mooc/topic.html +++ b/mooc/templates/mooc/topic.html @@ -1,5 +1,7 @@ {% extends 'mooc/_base.html' %} {% block styles %} +{% load staticfiles %} +