Skip to content
Advertisement

Tag: django

Django Migrations Circular Dependencies

so my django project was working completely fine and everything worked. I wanted to rename an app something else so I did and updated all the associated files in including the app.py config file. I also cleared the database and removed all migration files from each app. Ever since then I have never been able to finish makemigrations onto my

How to Convert MP4 to HLS with Multiple Audio and Multiple Video Quality in Python/Django?

I have tried with ffmpeg library and I can convert videos mp4 to hls with multiple quality but multiple audio is not working. > [Commands Excuting from Terminal] And with subprocess library calling subprocess.call. > [ Want to know is this the right way? to do with Django? ] Answer Here is the solution https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming Read the documentation and modify

How to display questions based on subcategory using Django Rest Framework?

I want to display all questions based on subcategory. This is my code : models.py serializers.py view.py /api/subcategory : /api/questions : From the data above I have 2 subcategories Mathematics and History and have 3 questions based on the subcategory, 2 questions about mathematics and 1 question about history. How to display in /api/questions only 2 questions about Mathematics? I’m

Crypto module and Encryption method not working

Basically, my question is divided into two problems, first of all, I am having this problem when I try running this code [code below] and get an error, like this: The second problem is when I enter text, i.e: “My data is here” I got the encrypted text as : “GIdd+zxj8m0nMeh7wmZJ+Q==” but reversing the process in decryption it outputs a

Django User Type Definition

In Django : From a Python OO perspective if I want different types of users shouldn’t I have a “Teacher” Object Type AND “Student” Object” type extended from AbstractUser? Looks like all the solutions mention to just extend with all the fields required for both users and only use the fields required for a Teacher or Student at Form time.

Advertisement