Category "django"

Bokeh: Generate graph server side, update graph from JS client side (change data source, axes ...)

I just took Bokeh for a spin on a Django site. Lot of fine tutorials out there and really easy to get a quick example running. For example, I have a Django view

How to optimize the downlaod big file problem in Django?

My Django project gives a download interface as follows: def download_item_vector(request): return HttpResponse(np.load('item_vector.npy')) I want to retur

React app won't connect to django-rest database

I'm to update the frontend of this site https://github.com/ildebr/store-repository it has a react frontend and a Django backend, auth is made with Django-rest-f

Testing UX with random IO?

So I've found a error in my UX that wasn't cought by test if I press besides a popup it goes into deadstate # they press ok btn = self.browser_adam.find_element

Is it possible to allow to create objects from the list_display view of the django admin site?

I have a model with fields name, roll_no, birth_date I am using the django admin's list display and list editable to have these fields displayed and edited in a

Django import-export how to handle blank Charfield

I'm trying to import some data with django import-export module. I'm having a problem and can't find any solutions to it despite the fact that it seems to be a

Using django-extensions to generate a model graph in PNG format using Windows 10 (without using Conda or Anaconda)

I am using django-extensions to generate a model graph for my Django application. My installation steps are the following: $ pip install django-extensions $ pip

Django can't login the superuser in admin page

So , I am trying to make an register and login system . I want to customize it using the custom user model , where I can save my data and extend the model. I am

Django google books API totalItems is changing

I am creating an application that retrieves data from the google books API. At the very beginning I download a number of books from JSON ["totalItems"] and iter

How to stop autopep8 not installed messages in Code

I'm a new Python programmer using the Mac version of VS Code 1.45.1 to create a Django project. I have the Python and Django extensions installed. Every time I

Django tries to write to a generated column

I've added GIN index to my db ALTER TABLE mtn_order ADD COLUMN textsearchable_index_col tsvector GENERATED ALWAYS AS (to_tsvector('english', coalesce(descr, ''

Django model default value in response

I want to have a default value in my django model response value Sample model query myModel.objects.filter().values("username", "user_gender") I want to have a

How to disable "HTML" tab in DRF Browsable API but keep "Raw" tab available

When using more complicated representation schemas (e.g. nested objects and lists), the "HTML" form part of the Browsable API in Django REST Framework becomes m

How to set max length on integerfield Django Rest

Okay so I need to have my field have a maximum of 10 integers allowed to be entered. I tried MaxValueValidator but I figured out that this just needs a value th

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