Category "django"

CSRF cookies not set - React, JWT, Django

I'm rather confused regarding the following error: "Forbidden (CSRF cookie not set.)". This error is received during attempting to logout, login, signup. The pr

Django in Docker: is GNU gettext tools only required in dev?

I'm building a Django app with Docker. I have 2 dockerfiles, one for dev and one for prod. To use Django's i18n, it's required to install "GNU gettext tools". I

Why Python String auto convert into Date in microsoft excel

I am writing data into a CSV file. file contains data related to student marks like 6/10, which means 6 out of 10. here the issue is when I open this file with

How to create a persigned url for a private s3 bucket using django rest framework

models.py def upload_org_logo(instance, filename): ts = calendar.timegm(time.gmtime()) filepath = f"Timesheet/org_logo/{ts}" if instance: b

Error while generating FCM token using django

This is error that i am getting in my javascript console: An error occurred while retrieving token. DOMException: Failed to execute 'atob' on 'Window': The str

django redirect to form view and autofill with previously entered values

I have following scenario. User fills out a form If the user clicks the "continue" button and the form is valid the user will be redirected to a summary view In

Adding field to Django model when the column already exists in the database

I have a model in Django which represents a MySQL table that has some extra columns. I want to add a field to the model for one of these extra columns but I'm n

how can i filter data between two time i am using date time field for it in django rest framework

I am trying to filter my data with a date-time field, but in my case its not working. So please someone suggest to me how can I filter my date with time start_t

Large File upload issue (working in local but not working on server)

I have a Django-based application that has the functionality to upload the file. We used to deploy the same in the azure web app. For the small file (max file s

RuntimeError: __class__ not set defining 'AbstractBaseUser'

Django app works fine local, but when pushed to heroku build works, but deploy fails: RuntimeError: __class__ not set defining 'AbstractBaseUser' as <class '

Error Using Ajax when I load from a differente file with Django

Im using JaxaScript(Jquery with Ajax) and my HTML Page all in the same file, but when I tried to code my JS and HTML in different files, I get an error when try

Django connect SQL Server using active directory user

I'm using Django and mssql-django backend to connect to SQL Server. No problems to connect to SQL Server when using sql login. But, when I try to connect using

Share django transaction across threads

I've a problem where one API implemented in a django (3.2) web app running with gunicorn (gevent) has to fetch different prices from multiple APIs and store tho

Microsoft auth doesn't redirect after successful login

I am integrating Microsoft's login using Django Microsoft Authentication Backend. I have managed to to get a successful response and create a new "Microsoft" us

No transition from ASSIGNED viewflow

Previously i had an issue with viewflow as i was attempting to assign the process pk to a foreign key field. It seems like the issue has been resolved , however

pip can't find django 3.x - ERROR: No matching distribution found for django==3.0.4

When I run: pip3 install django==3.0.5 I get the error ERROR: Could not find a version that satisfies the requirement django==3.0.5 (from versions: 1.1.3, .

Django filtering on a queryset not working

I am trying to add a filter on an existing queryset based on a condition but it doesn't work. This works queryset = None if self.is_instructor =

How to get the code returned by Cognito Hosted UI Autentication in Django?

I want to implement the Cognito Hosted UI for some users in my Django application. I have successfully been able to redirect the users to the desired url for au

django-import-export, importing ManyToMany from XLSX

For my current project I need to import data from excelsheets format .xlsx to the django-admin. I'm struggling with the many2many relations that I have in my mo

Django REST Framework ApiView not allowing DELETE

I am new to Django and I am having a issue sending a DELETE request to a class based view which inherits from APIView. Here is my class: class PageDetail(APIV