Category "django"

ImportError: Couldn't import Django. PYTHONPATH

There was an error account.User that has not been installed but I solved this problem. After that, another error says The SECRET_KEY setting must not be empty.

NoReverseMatch at / Reverse for 'profile' with arguments '('',)' not found. 1 pattern(s) tried: ['profile/(?P<name>[^/]+)/$']

I am a beginner in learning code and am working on making a simple django site where users can write comments but I keep getting this error My urls.py from djan

local variable 'search_keyword' referenced before assignment

I have been working on a search form and it's giving me this error when i open the url or submit the form. I am watching a codemy django tutorial and the only t

Django models in admin return TypeError: bad operand type for unary -: 'str'

I'm working on a project using Django(3) and Python(3) in which I have added few models and added those models in admin.py, but when I open the admin panel and

dependencies reference nonexistent child node

I tried to dockerize my Wagtail Web Application and this error Occurred. I tried docker-compose build there was no errors. after that i tried docker-compose up

Django OperationalError at new model object

I created a system with Django. My model was working until I added a new field but when I add new field it gives an error. My new field is owner_id Operational

Django-plolty-dash errors: for ImportError: Can't import 'Dash' from 'dash'

Python version: 3.7.9 Django version: 3.1.1 django_plotly_dash: 1.4.2 I have tried to install django_plotly_dash package after I tested the Django project coul

Deploying a Django application to Heroku - No module named 'django_project.wsgi

I'm trying to deploy a django application but I keep getting this error: ModuleNotFoundError: No module named 'django_project.wsgi' In fact, here's the full lo

How to prevent N+1 queries when fetching ancestors with Django Treebeard?

We are using Django Treebeard's materialized path to model an organizational hierarchy as follows: Now each node in the organizational tree can have multiple t

Add security checks in graphene resolver

I am using Django and Graphene to serve a graphql endpoint and I have hit a bit of a problem I can't seem to figure out. I have following resolver: class Query(

How to pass a video return from JavaScript to python backend in Django view for OpenCV

I want to do certain tasks and the processes are as follows: 1. Access the camera of the user to get the video-frames from them. 2. Process the video frames fro

Instruct WebApp using Django to run the code locally and return results

I am a newbie to web development and python scripts. I am learning to host python scripts using Django. I would like to know how to instruct Django to run the s

django don't show form in template

django dont show my form in my template where is the problem? forms.py from django import forms class QuestionForm(forms.Form): massage = forms.CharField(w

AttributeError: type object has no attribute 'get_extra_actions'

I have a small web app, and I'm trying to develop an API for it. I'm having an issue with a model I have called Platform inside of an app I have called UserPlat

How to assign new value to a ModelForm field which form edits user data, to test if the data will be edited Django test TestCase

I'm testing Django forms handling and trying to test a ModelForm, which form edits the user's data. I tried to write the test in several ways, but each one thro

Disable pagination inspector on drf_yasg

I'm using drf_yasg to create my swagger document but I have an issue with PaginationInspector. In one of my views I declare a paginator and in swagger, is shown

How to get rid of Django security vulnerabilities warning signs in terminal

I have a simple Django project with a PostgreSQL backend and I can't seem to get rid of the Django security vulnerabilities warning signs on my terminal. Settin

Is there a Django library that automatically display local currency based on a visitors country IP address

I'm trying to integrate a functionality on an Ecommerce website in Django, Where visitors are automatically shown local currency base on their country IP addres

IntegrityError NOT NULL constraint failed: even though I have already overriden the form_valid?

So I'm trying to create a simple Comment feature for a blog app. In the Class-based views, if you are using a Foreign Key in your model, I know that you have to

Django & MeMSQL Error when running migrate.py: django.db.utils.OperationalError: (2012, 'Error in server handshake')

I have a Django application with a default MySQL database. I want to move my default Database to MeMSQL. I set the credentials in settings.py to be: DATABASES =