Category "django"

How to manage JSON data in javascript pass form django model?

I need to dynamically display my audio on my website. The audio is a file path stored in the Django model. Djanog Model: class audio(models.Model): instrumentId

OpenID Connect + Django DRF + React: How to use?

I have a web application made up of two parts: back-end which is implemented using Django + Django Rest Framework (DRF), and front-end which is a React App proj

In django admin panel permissions given to the users by group not working

In Django admin panel I create groups and give permission to them. eg: Create a Student Group and give it permission to view the student model. Create a Teacher

How to filter in django by greater than or less than dates?

I'm a little confused with the documentation on Django Rest Framework. I have read it several times but I cannot makes sense of it. Maybe I'm not smart enough,

Django bulk update list of objects

I want to create an API endpoint, where you can PUT list of objects and it will work like this: If the ID is specified, query that object and try to update it (

django - How to auto-populate existing data in django form while updating

I want to auto populate my update form in django with the existing data, but instance=request.user and instance=request.user.profile seems not to be auto popula

Django - Add a confirmation email fuction [closed]

Create user page image So I have a fully working signup page so far. I want to add a simple confirmation email function, that sends an email t

Django app runs locally but I get CSRF verification failed on Heroku

My app runs fine at heroku local but after deployed to Heroku, every time I try to login/register/login as admin, it returns this error shown below. I have trie

I can't donwload complete genome of Culex pipiens pallens of the ncbi by API (Entrez): HTTP Error 400: Bad Request

I am trying to download the genbank if possible of the complete genome of Culex pipiens pallens from the ncbi but I get this error. The URL of de ncbi. In the d

Django How to search if field is ForeignKey?

Good day SO: So I have something like the following: class Nationalities(models.Model): country_name = models.CharField(...) class Profile(models.Model):

Integrating Scrapy into Django/React application

I'm trying to build a site with Django and React, where you can create watchlists with companies. If you view the watchlist, you'll be able to see the price of

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