Skip to content

engineerscodes/PROTO-SEEK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PROTO-SEEK

logo


Video Sharing platform for School and college

Tech used

  1. django (Backend)
  2. django rest framework (API)
  3. Ajax
  4. html and css and js
  5. chartjs
  6. bootstrap
  7. static_ranges for video
  8. dj_static
  9. Smpt2go for mailing verifying EMAIL ADDRESS OF USER
  10. thumbnail generation using Canvas Check out the file link

ITS A VIDEO ASSESSMENT CREATE ON ORGANISATION LEVEL

eg- studens,teacher

DIFFERENT LEVELS OF PRIVILEGES

Students can access Few urls Teacher can access Few urls
User have to reg to become teacher url - link
Admin of the ORGANISATION will review the request ,This method is used because Most of school or college May not have ORGANISATION Email



USAGE


  1. Fork or Clone the Repo
  2. Change it As per Your ORGANISATION 3.ADD YOUR SMPT2GO USERNAME AND PASSWORD -CLICK
  3. The Existing username and Password will be Changed soon
  4. CREATE YOUR SQLDB
  5. Add your email here here
  6. The mail will use this Email Address
  7. Buy your Domain name And Add it in allowed here
  8. Host your Django Project ON AWS OR DIGITAL OCEAN
  9. Don't Host on Heruko(Free) because Request TimeOut image
  10. I have Still Hosted on Heruko (free) for now demo purpose
  11. You cannot upload file to it, because of Request TimeOut
  12. I recommend AWS HOSTING

Working

  1. clone to Project Locally
  2. TO Run Project
 cd ProTO
 python manage.py runserver
  1. MakeMigration
 python manage.py makemigrations
  1. Migrate DB
 python manage.py  migrate
  1. IF your making Changes in CSS OR JS (static files) and DEBUG IS FASLE then Run this Command
 python manage.py  collectstatic
  1. Also you can change Static root and Media root -STATIC URL ROOT MEDIA ROOT

DB INFO

  1. ACCOUNTS -DJAGNO User MODEL
  2. TEACHER APP
  3. TEACHERS TABLE primaryKey is Teacher
class TEACHER(models.Model):
   teacher = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
   is_active=models.BooleanField(default=False)

   def __str__(self):
       return "EMAIL: " + self.teacher.email + " | USERNAME: " + self.teacher.username
  1. TEACHERS CLASS ROOM USES OF F.K (ForeignKey) check out django doc ,PrimaryKey is ID eg(1,2,3,4,......100....)AutoField
class TeacherClassRoom(models.Model):
   class Meta:
       unique_together = (('teacher', 'classRoomName'))
   teacher=models.ForeignKey(TEACHER,on_delete=models.CASCADE)
   classRoomName=models.CharField(max_length=25)
   class_url=models.CharField(max_length=2000,blank=True)

   def __str__(self):
       return  str(self.id)
  1. Students in Class Table ,P.K IS ID for this Table
class StudentInClassRoom(models.Model):
   class Meta:
       unique_together = (('classId', 'student'))
   classId=models.ForeignKey(TeacherClassRoom,on_delete=models.CASCADE,to_field='id')
   student=models.ForeignKey(User,on_delete=models.CASCADE)
  1. EVENT (ASSIGNMENT) PK IS ID FOR IS TABLE TOO
class Event(models.Model):
   class Meta:
       unique_together = (('eventname', 'Room'))
   eventname = models.CharField(max_length=50)
   Room=models.ForeignKey(TeacherClassRoom,on_delete=models.CASCADE)

   def __str__(self):
       return "Room :"+self.Room.classRoomName+"| Event :"+self.eventname
  1. Till Now all the above table to linked togther with ForeignKey
  2. Video App
  3. videoUpload table PK is id for this table
class videoUpload(models.Model):

  captions=models.CharField(max_length=100)
  username=models.CharField(max_length=100)
  date=models.DateField(default='2001-04-12')
  EventName=models.CharField(max_length=50,default="")
  thumbnail=models.TextField()
  video=models.FileField(upload_to="videos/%y",validators=[file_size,FileExtensionValidator(allowed_extensions=['mp4','MOV','MKV'])])
  url_64encoding=models.CharField(max_length=2048,default='/upload/videos/')
  Total_marks=models.IntegerField(default=0)
  EventID=models.CharField(max_length=100,default='welcome newbie')
  def __str__(self):
      return  self.captions
  def total_marks(self):
      return self.Total_marks
  1. MarkUpload table PK is id for this table
class Marks(models.Model):
  class Meta:
      unique_together=(('videoId','moderator_email'))
  videoId=models.CharField(max_length=250)
  by_email=models.CharField(max_length=250)
  marks=models.IntegerField(validators=[MinValueValidator(0)])
  moderator_email=models.CharField(max_length=250)
  video_link=models.CharField(max_length=100000)
  date=models.DateField(default='2001-04-12')
  EventName = models.CharField(max_length=50, default="")
  verfiyed=models.BooleanField(default=False)
  def __str__(self):
      return "VideoID:" +self.video_link+" BY :"+self.moderator_email
  1. Since we are using AIP you must have serializers class for this app
  2. READ DJANGO DOC
from rest_framework import serializers
from .models import videoUpload, Marks
from django.apps import apps
Events=apps.get_model('Event','Event')

class MarksSerializer(serializers.ModelSerializer) :
  class Meta:
      model=Marks
      #fields="__all__"
      fields=('video_link','date','by_email','EventName','marks')

class videoUploadSerializer(serializers.ModelSerializer):
  class Meta:
      model= videoUpload
      #fields="__all__"
      fields=('url_64encoding','date','username',)

class videoUploadSerializerMark(serializers.ModelSerializer):
  class Meta:
      model= videoUpload
      #fields="__all__"
      fields=('url_64encoding','date','username','EventName')

class SubmitVideo(serializers.ModelSerializer) :

  class Meta :
      model=videoUpload
      fields=('thumbnail','video','captions')
      #extra_kwargs = {'username': {'required': False}}

class VDContent(serializers.ModelSerializer):

  class Meta:
      model= videoUpload
      fields=('url_64encoding','thumbnail','captions','username','date','EventName')

class EventSerial(serializers.ModelSerializer):

  class Meta:
      model=Events
      fields='__all__'

IMAGES and HOW TO USE

  1. LOGIN -LINK
  2. Activation mail image 2.1. ADMIN MUST CHECK THIS FILED THEN ONLY The TEACHER IS VALIDATED or VERIFIED image

3.TEACHER REG PAGE - link for you the message may be diffrent (like under admin review ) image

4 . CREATE CLASS AND SHARE THE CODE WITH STUDENTS link image

5 . Only Teacher can see this Page HOMEPAGE FOR teacher image image

  1. ON click any class you will get all students list ,event and create a event for the class -(event means assignments) image image

  2. assign marks to video image

  3. Click on video will open The vidoe for You in above imageimage

  4. Teacher can get all stat ,about uploads and pending videos (link)[https://protoseek.herokuapp.com/teacher/info/] image image

  5. for Students the HomePage is link image

  6. upload page link image

  7. Import Join class link image