Category "django"

I have replaced the user model provided by Django with the one I created, the problem is on the admin page

I have replaced the user model provided by Django with the one I created but I don't know how to solve the problem in admin can't process anything! it always re

Redirect http to https in Django (using sslserver)

I have a django project working with HTTPS using django sslserver.I want http to be redirected to https. I tried adding SECURE_SSL_REDIRECT = True which does no

model with this Email already exists in django

I have made a custom user model. signup and logout are working fine. but I have made a login form using that model. my model name is usersignupmodel. but whenev

model with this Email already exists in django

I have made a custom user model. signup and logout are working fine. but I have made a login form using that model. my model name is usersignupmodel. but whenev

Django: Could not parse the remainder

I'm trying to pass a response from JsonResponse as a parameter of specific function in views. But, got the following error instead django.template.exceptions.Te

What is the way to ignore/skip some issues from python bandit security issues report?

I've got a bunch of django_mark_safe errors >> Issue: [B703:django_mark_safe] Potential XSS on mark_safe function. Severity: Medium Confidence: High

django channels WebsocketCommunicator TimeoutError

I am trying to run the following test: tests.py from rest_framework.test import APITestCase from myapp.routing import application from channels.testing import W

Django: Could not parse the remainder

I'm trying to pass a response from JsonResponse as a parameter of specific function in views. But, got the following error instead django.template.exceptions.Te

ManyToMany Relationship between two models in Django

I am trying to build a website that users can add the courses they are taking. I want to know how should I add the ManyToMany relationship. Such that we can ge

Model.clean() vs Model.clean_fields()

What is the difference between the Model.clean() method and the Model.clean_fields() method?. When should I use one or the other?. According to the Model.clean

Django's static() function to retrieve static file gives no such file -error

I'm doing a project with Django with the following structure: /project /cv /static /configuration configuration.json So a project w

Use email created on cpanel in django

I have created an email id on my cpanel, I want to use it in django. As for gmail we write, EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAI

digital ocean deployment error: 502 Bad Gateway

I had my site up and running, but the admin CSS was not loading, I am not sure what I did that the server did not agree, but now the entire site is down with a

I keep getting RelatedObjectDoesNotExist at /admin/login/. How do I successfully create user profiles in Django via a one to one relationship?

I'm trying to extend the built-in user and add some more information to it. I have two apps in my django project- general and user_details. Inside my user_detai

integrating clean architecture with ORM

I'm trying to develop a monolithic Django application with Uncle Bob's clean architecture. The problem is I don't want to miss the powerful abilities of Django

Access "Browser" location

We all have seen this prompt: As far as I know, this is not IP-based location. This is device-based location. I don't want IP-based location because 1) It's no

how to access django related field from model methods?

is it possible to access django related field from model methods? for example, i have an Author with many Books is it possible to access the list of books fr

filefield serializer is not parsing the file object

I have a model in my application: class GRNRFIDSerials(models.Model): grn = models.ForeignKey(Grn, on_delete=models.CASCADE) file = models.FileField(up

Invalid block tag : 'endblock'. Did you forget to register or load this tag?

l get stuck in this error. l'm fresh user of Django and l m learning it by following steps on Youtube channel. l did everything same but l got this block tag er

How to check if a request consists of session id and csref token in the cookie in Django rest framework?

my rest_framework authentication and permission classes "DEFAULT_PERMISSION_CLASSES": [ "rest_framework.permissions.IsAuthenticated", "rest_fra