To preface, I'm not asking for a direct fix here, I'm just curious if what I'm doing is the appropriate auth flow for setting dynamic client ID based on device platform. I am 2 applications that use the same Django …
Sometimes, I have many flaky test failures due to one error: ImportError: cannot import name 'task_import_events_to_db' from 'app.tasks' (unknown location) It seems the tests fail because of this import error. Meanwhile, other branches pass without issues, and tests …
I am experiencing an error for which I can’t find an origin. I believe the error stems from GitHub - fusionbox/django-authtools: A custom User model for everybody!, and disclaimer, I have asked this same question on the …
I've a project based on django that wrap some custom code, this code during import load some heavy file before to be executed. I need to check if imports are executed under "runserver command" or not, in this way I …
I have a Django REST project where I created a directory called apps to store all my apps. Each app is added to the INSTALLED_APPS list in my settings file like this: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', …
In View Function it can show this error Request Method:GETRequest URL:http://127.0.0.1:8000/inbox/Django Version:4.2.25Exception Type:ValueErrorException Value:Cannot query "admin": Must be "ChatMessage" instance.Exception Location:D:\Socialmedia\.venv\lib\site-packages\django\db\models\sql\query.py, line 1253, in check_query_object_typeRaised during:core.views.messages.inboxPython Executable:D:\Socialmedia\.venv\Scripts\python.exePython Version:3.9.13Python Path:['D:\\Socialmedia', 'C:\\Users\\ER-RPJ\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip', 'C:\\Users\\ER-RPJ\\AppData\\Local\\Programs\\Python\\Python39\\DLLs', 'C:\\Users\\ER-RPJ\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\Users\\ER-RPJ\\AppData\\Local\\Programs\\Python\\Python39', 'D:\\Socialmedia\\.venv', 'D:\\Socialmedia\\.venv\\lib\\site-packages'] def inbox(request): …
I'm processing webhooks on Cloud Run (Django) that need async handling because processing takes 30+ seconds but the webhook provider times out at 30s. Since Cloud Run is stateless and spins up per-request (no persistent background workers like Celery), I'm …
I am trying to annotate a queryset with next_service = last_service + verification_periodicity_in_days and then filter by that date. I am on Django 5.2.6 with PostgreSQL. last_service is a DateField. verification_periodicity lives on a related SubCategory and is the number …
I’m trying to deploy a Django application that uses Channels + ASGI + Daphne on AWS Elastic Beanstalk with the Docker platform. My container builds successfully, migrations run, and Daphne starts properly on 0.0.0.0:8000. Logs show the ASGI server is …
I associated public elastic ip address to my EC2 instance , Installed Virtual environment properly, python manage.py runserver 0.0.0.0:8000 is executed properly Postgresql is connected at port 5432 properly. Port 22, 80, 443 firewall are allowed properly here is the …
I fill the Django form in contact.html file. But form data is not saved in database or another place. There is no error or warning while saving the form data. Form screenshot: Form screenshot. views.py: from .forms …
I'm encountering a persistent 403 Forbidden error with the detail: CSRF Failed: CSRF token missing. This happens when trying to obtain an authentication token using Django REST Framework's built-in api-token-auth/ endpoint. Context I am sending …
AccrediDoc - Multi-tenant Accreditation Management System A comprehensive Django-based multi-tenant accreditation management system designed for healthcare organizations in India. Manage NABL, NABH, ISO 15189 and other healthcare accreditations with ease. Features Multi-tenant Architecture: Secure, isolated environments for multiple organizations …
I am using Django 5.2 with Postgres 17 and try to modify the queryset of a ListView for row-based access control. Items are to be included in the queryset either if the user is part of a project that is …
I have two views that spawn these messages in "sudo systemctl status gunicorn": gunicorn: Nov 07 10:46:36 mysite gunicorn[2107]: cleansed = [self.cleanse_setting("", v) for v in value] Nov 07 10:46:36 mysite gunicorn[2107]: File "/home/mysite/anaconda3/envs/mysite/lib/python3.10/site-packages/django/views/debug.py", line 135, in cleanse_setting The …
I'm integrating Apple In-App Purchases with StoreKit 2 in an iOS app. The backend (Django) handles subscription verification and links each transaction to a user using appAccountToken. Everything works fine for normal subscription purchases — the app sets the …
I am upgrading my Django project to v5.2.7. After installing requirements.txt with the upgraded versions of all libraries, I ran the command to validate the code python manage.py check But it is throwing error ImportError: Could not import 'rest_framework_simplejwt.authentication.JWTAuthentication' for …
I have developed a project for SASS with django tenate. While migratiing, I got the following error it seems, like it is related to migration file. (acc_venv) D:\\workik_projects\\AccrediDoc_v2\>py manage.py makemigrations report Traceback (most recent call last): File "D:\\workik_projects\\AccrediDoc_v2\\manage.py", …
I'm deploying my Django project to Vercel, and everything works fine locally but after deployment, images from the static folder are not showing. Project structure: datafam/ ├── settings.py ├── wsgi.py static/ └── teams/ └── image/ ├── Abu Sofian.webp ├── Crystal …
I've set-up email sending in my Django project that is deployed on AWS. When I run it locally the emails go out without a problem, but when I try it on production server on EC2 ubuntu VM, I get smtplib.SMTPAuthenticationError: …
I've been looking around for an answer to this, but struggling to find something definitive. My apologies if I've overlooked something obvious. I'm processing webhooks on Cloud Run (Django) that need async handling because processing takes 30+ seconds but the …
I want to add another option in it which is send Email, which will send email to all the subscribers class FeaturedPageViewSet(SnippetViewSet): model = FeaturedPages menu_label = "Featured Pages" menu_icon = "grip" menu_order = 290 add_to_settings_menu = False exclude_from_explorer = …
The static files in my Django production app recently started returning 404s. Screenshot of production site with dev tools open Context This project has been deployed without issue for several years. I have not pushed …
I have a Django project with DjangoRestFramework. I have a simple view, Facility, which is a ListAPIView. Permissions were generated for add, change, delete and view. I have create a new user, and have assigned him no permissions. Yet he …
I am running Django app with gunicorn gevent workers. I'm using Statsig for Feature Flagging. It appears to be struggling, I assume due to gevents monkey patching. I was hoping I could get around this by running Statsig post app …
In my application, written in Django 5.2, I want to aggregate static data and store it as a materialized view in PostgreSQL 16.10. I can create it as my own migration or using the django-materialized-view library. I have no problems …
We are running Django with uvicorn asgi in kubernetes. Following best practice guides we are doing this with only 1 worker, and allowing the cluster to scale our pods up/down. We chose asgi as we wanted to be async ready, …
So i am making a backend system using DRF in Django, this is my first project in django and drj, i am using django purely as a rest backend i am making a Quiz/mcq application this is from my questions …
I'm working on a Django application in which I need to calculate the difference between timestamps stored in the DB. This week I run into some problems related to DST. In particular in the following code snippet: tEndUtc = tEnd.astimezone(timezone.utc) …
I am an intern at a company and we are using django as framework. I was working on a two part register system in which an admin performs the initial registration after which a link is sent to the user …
Beat seems to be sending the messages into SQS very slowly, about 100/minute. Every Sunday I have a sendout to about 16k users, and they're all booked for 6.30pm. Beat starts picking it up at the expected time, and I …
Summary Running Django migrations against our MongoDB database does not create MongoDB collections or indexes as defined in our app. The command completes without errors, but no collections or indexes are provisioned in MongoDB. Environment Django: 5.2.5 django-mongodb-backend: 5.2.2 Python: …
I’m working with a hierarchical model structure in Django, where each level can represent a region, district, or village. The structure looks like this: class Location(models.Model): name = models.CharField(max_length=255) parent = models.ForeignKey( 'self', on_delete=models.CASCADE, related_name='children', null=True, blank=True ) def __str__(self): …
I'm trying to deploy a Django app with Gunicorn and Nginx under a subpath, I'm inside a corporate network, and the path www.example.com/myapp points to the IP 192.168.192.77:8080 of my PC on the local network (I have no control over …
Why I need to use atomic() when I have only 1 db operation inside atomic block? My AI-assistant tells me that it prevents race conditions, but I don't use select_for_update() inside. It tells that db looks on unique constraints and …
As part of a django project, I need to build translation *.po files, but I have the error CommandError: Can't find xgettext. Make sure you have GNU gettext tools 0.19 or newer installed. when I run django-admin makemessages -a …
Issue WAF is showing some errors due to including some HTML tags in my payload responses (mostly field-like messages and user guides). Sometimes, I am also sending R programming language code to the server, which will just be stored in …
I am running a test simulation on a virtual server in VirtualBox to see how the procedure of installing a web application using Docker would work on a client server. My stack includes: Frontend: React.js, built into a Docker …
I am doing a Django project where I am using JWT token for authentication. But the problem is that two different JWT tokens are both valid with the same signature that is provided in the backend with …
Again, I am quite new to Supabase so I apologize in advance if I don't provide clear details in this post or mess up with some terms or something Basically, I am doing auth using Supabase and have this table …