Category "django"

Can not get comment id with AJAX in django

I'm fighting with this problem during several days and can not find the solution for my case. I'm trying to make system of likes without refreshing the page. In

Bootstrap tabs doesn't work with Django include option

I am working with bootstrap tabs in Django on page ps_tabs_capacity.html which extends the base.html . Inside ps_tabs_capacity.html there is tab I include anoth

Django +docker-compose + Celery + redis - How to use Redis deployed in my own remote server?

I have a Django app deployed in Docker containers. I have 3 config environnements: dev, preprod and prod. dev is my local environnement (localhost) and preprod/

How to increase number of workers in Daphne with Django

With gunicorn I can increase thenumber of workers using -w 17 command: gunicorn server.asgi:application --bind 0.0.0.0:8000 -w 17 -k uvicorn.workers.UvicornWork

Not able to install django-allauth in ubuntu 18.04.6 LTS

I'm trying to add social authentication in my project but when I try to install django-allauth it is giving me error I've tried this post but no luck it's givin

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