Am trying to just get a list of the made up gigs, (and hopefully make them links, to view them in a different html). Page result right now looks like this; <QuerySet [<Gig: Fulltime assistent needed from fall 2021!>, <Gig: Looking for event staff!>]> I don’t know how to remove queryset…
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 …
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 …
unable to show success page after completion of payment
i am using razorpay payment gateway web integration for my learning eccomerce project everyhing work fine payment can be done all i want is to store some information after payment done in my order model using test mode my views.py for checkout so what the error is after payment completion i want to show html …
django.core.exceptions.FieldDoesNotExist: User has no field named ‘username’
I’m trying to customize django’s AbstractUser. When I try to reset username to None, I get the following exception: Here is my code: What can I do to solve this problem? Answer You haven’t set a value for USERNAME_FIELD in your code. This must be set to a field that uniquely identifies a use…
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 hist…
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==” bu…
how to create django template tag for custom model
I’m new for django template tag. I am trying to display logged user payment_status and remaining_days on django html template. For this I wrote model and I don’t know how to write template tag for this. Request your help on this. I want to display payment_status above in model and remaining_days =…
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 on…
Django – OperationalError after deleting migration files
In the earliest days of my system, before i knew how to utilize django’s built-in User model, i had my own class named myUser which i intended to use for the same purpose. i ended up deleting this one and instead using django’s User model. all was fine for a while. then i tried to change the id of…