Category "django"

I'm trying to return mutliply queryset

I have endpoin called groups I want to return to each user groups that he created and the groups that he member in it my model class Group(models.Model): ti

How to convert a view to a pdf in Django?

I need to render PDF files dynamically in a Django web app. I understand there are 2 options : Render an html template file then convert it to a PDF file. Conv

Is there any solution to fix this Cors error?

I have made an api from django but when I call from my react app It gives CORS error my settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.

Auto-submit django form without causing infinite loop

I have an issue on my app that I can't work out the best way to approach the solution. I'm learning Django and have little to no experience in Javascript so any

Tailwindcss LSP for Neovim root_dir issue

I am having an issue with the Tailwind LSP in Neovim 0.5 where the language server running however I get no intellisense when defining a class. I am working on

Extract multiple start date and end date from a string in python?

I am making a resume parser but I want to know the years of experience of the person from the experience section and want results like if there are 3 years of e

How to handle Firebase Cloud Messaging Notifications in Django?

I am managing to send FCM notifications to my app through Django. Here is my function for pushing notifications: import firebase_admin from firebase_admin impor

Django: How to run a celery task only on start up?

I have a django app that uses celery to run tasks. Sometimes, I have a "hard shutdown" and a bunch of models aren't cleaned up. I created a task called clean_up

How to get VScode Integrated Terminal Virtual Environment working?

I have completed a few courses online in Python and recently started a new course in Django. Previously I always used a virtual environment but would activate t

django-filter list of links

I'm using django-filter's ChoiceFilter to generate a dropdown to filter results and it works great. However a dropdown is not what I have in mind for the design

How to use memray with Gunicorn and Django?

I have a project with Django and I did a multiread with Gunicorn. but my project has a memory leak. I want to monitor memory with "memray" but I don't know how

Django related_name import Objects instead of foreign_keys

When I importing my CSV file in db.sqlite3, I don't know how to import foreign_key instead of "Object". This is what I've tried. # import_csv.py (manage.my cust

why does python3.6 container uses the /usr/lib of python 3.9

I start a docker contain with FROM python:3.6 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get install -y apt-utils vim curl apache2 apache2-ut

Add extra data in JWT header, simple jwt

I want to override or extend Django simple JWT obtain token method to add 'kid' key to the token header, JWT format is header.payload.signiture, I know how to a

Django social-auth-app-django error after social login completed

AttributeError at /social-auth/complete/github/ 'NoneType' object has no attribute 'provider' Other solutions on this site did not solve the problem. Sorry if y

difference between django and django rest framework

Okay I just finished a YouTube course on Django tutorials and i more or less understand Django to an extent. Now the issue is Django rest framework. Google says

Filter queryset of django inline formset based on attribute of through model

I have a basic restaurant inventory tracking app that allows the user to create ingredients, menus, and items on the menus. For each item on a given menu, the u

I want to make a User to User Private Live Chat App with React & Django

I'm really confused about that. I want to make a user to user chat app on my project with Django and React. I've tried create a model and fetch messages with Re

'cryptography' package is required for sha256_password or caching_sha2_password auth methods

Request Method: POST Request URL: http://192.168.0.110/admin/login/?next=/admin/ Django Version: 4.0.1 Exception Type: RuntimeError Exception Value: 'cryptog

How to solve PytestConfigWarning: Unknown config option: DJANGO_ SETTINGS_MODULE error?

I am using django to build my website and I have used django-pytest to test my apps but I have got this error Note I am usign python 3.9 =======================